Data system with data flush mechanism

ABSTRACT

A data storage system includes a head node and mass storage devices. The head node is configured to flush data stored in a storage of the head node, based at least in part on one or more triggers being met, from the storage of the head node to a set of the mass storage devices of the data storage system. The flushed data is written to a segment of free storage space across the set of the mass storage devices allocated for the given data flush operation. In some embodiments, a head node may flush both current version data and point-in-time version data to the set of mass storage devices. Also, the data storage system maintains an index that indicates storage locations of data for particular portions of a volume before and after the data is flushed to the set of mass storage devices.

BACKGROUND

The recent revolution in technologies for dynamically sharing virtualizations of hardware resources, software, and information storage across networks has increased the reliability, scalability, and cost efficiency of computing. More specifically, the ability to provide on demand virtual computing resources and storage through the advent of virtualization has enabled consumers of processing resources and storage to flexibly structure their computing and storage costs in response to immediately perceived computing and storage needs. Virtualization allows customers to purchase processor cycles and storage at the time of demand, rather than buying or leasing fixed hardware in provisioning cycles that are dictated by the delays and costs of manufacture and deployment of hardware. Rather than depending on the accuracy of predictions of future demand to determine the availability of computing and storage, users are able to purchase the use of computing and storage resources on a relatively instantaneous as-needed basis.

Virtualized computing environments are frequently supported by block-based storage. Such block-based storage provides a storage system that is able to interact with various computing virtualizations through a series of standardized storage calls that render the block-based storage functionally agnostic to the structural and functional details of the volumes that it supports and the operating systems executing on the virtualizations to which it provides storage availability.

Some block-based storage systems utilize a server node and multiple storage nodes that are serviced by the server node or dual server nodes that service multiple storage nodes. For example, a storage area network (SAN) may include such an architecture. However, in such systems, a failure of one or more of the server nodes may result in a large amount of storage capacity served by the server node(s) being rendered unusable or may result in significant decreases in the ability of the storage system to service read and write requests.

In order to increase durability of data, some block-based storage systems may store data across multiple devices in multiple locations. For example, a SAN may span multiple locations such as different facilities or different geographic locations. Such systems may utilize a common control plane to manage data in the multiple locations. However, in such systems, a failure of a component of the common control plane may impact a large quantity of storage capacity and render the large quantity of storage capacity unavailable. Also, such systems may require extensive networks to move data between the multiple locations and may also result in high latencies for data recovery due to data being located across the multiple locations.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a data storage unit comprising head nodes and data storage sleds, according to some embodiments.

FIG. 2 is a block diagram illustrating a provider network implementing multiple network-based services including a block-based storage service that includes data storage units, according to some embodiments.

FIG. 3 is a block diagram illustrating head nodes and data storage sleds of a data storage unit storing block storage data in response to a write request, according to some embodiments.

FIGS. 4A-4B are block diagrams illustrating a log storage and index of a head node storage, according to some embodiments.

FIG. 5 illustrates a partial view of a data storage unit that stores portions of a volume partition in multiple mass storage devices in multiple data storage sleds on multiple shelves of the data storage unit, according to some embodiments.

FIGS. 6A-B illustrate columns of mass storage devices storing different portions of a volume partition, according to some embodiments.

FIG. 7 is a high-level flowchart illustrating operations performed by a head node in response to a request to store data in a data storage unit, according to some embodiments.

FIG. 8A is a high-level flowchart illustrating operations performed by a head node in response to a failed mass storage device in a data storage sled of a data storage unit, according to some embodiments.

FIG. 8B is a high-level flowchart illustrating operations performed by a head node in response to a failed mass storage device in a data storage sled of a data storage unit, according to some embodiments.

FIG. 9 is a high-level flowchart illustrating operations performed by a head node of a data storage system in relation to flushing data to mass storage devices of the data storage system, according to some embodiments.

FIG. 10 illustrates an index used to track portions of a volume for which data has been written to a head node of a data storage system but not yet flushed to mass storage devices of the data storage system, according to some embodiments.

FIG. 11 illustrates an example organizational scheme for an extent comprising multiple segments of data flushed from a head node to a set of mass storage devices, according to some embodiments.

FIG. 12A-B are high-level flowcharts illustrating operations performed by a head node of a data storage system that supports flush-views, according to some embodiments.

FIG. 12C illustrates an example sequence of operations performed by a head node that supports flush-views, according to some embodiments.

FIG. 13A is a block diagram illustrating a process for creating a volume involving a zonal control plane, a local control plane, and head nodes of a data storage system, according to some embodiments.

FIG. 13B is a block diagram illustrating head nodes of a data storage unit servicing read and write requests independent of a zonal control plane of a data storage system, according to some embodiments.

FIG. 14A is a block diagram of a head node, according to some embodiments.

FIG. 14B is a block diagram of a data storage sled, according to some embodiments.

FIG. 15 is a high-level flowchart illustrating a process of creating a volume in a data storage system, according to some embodiments.

FIG. 16A is a high-level flowchart illustrating a local control plane of a data storage unit providing storage recommendations to a head node of the data storage unit for locations to store data in data storage sleds of the data storage unit for a volume serviced by the head node, according to some embodiments.

FIG. 16B is a high-level flowchart illustrating a head node of a data storage unit storing data in data storage sleds of the data storage unit, according to some embodiments.

FIG. 17 is a high-level flowchart illustrating head nodes of a data storage unit performing a fail over operation in response to a failure of or loss of communication with one of the head nodes of the data storage unit, according to some embodiments.

FIG. 18 is a block diagram illustrating performance and/or usage metrics being collected and accumulated in a data storage unit, according to some embodiments.

FIG. 19 illustrates interactions between a local control plane, head nodes, and data storage sleds of a data storage unit in relation to writing data to mass storage devices of a data storage sled of a data storage unit, according to some embodiments.

FIG. 20 is a high-level flowchart of a head node of a data storage unit flushing data stored in a storage of the head node to a data storage sled of the data storage unit, according to some embodiments.

FIG. 21 is a high-level flowchart of a sled controller of a data storage sled processing a write request, according to some embodiments.

FIGS. 22A-D illustrate a data storage unit with redundant network paths within the data storage unit, according to some embodiments.

FIGS. 23A-C illustrate a data storage unit configured to allow scaling of storage capacity and processing capacity, according to some embodiments.

FIG. 24 is a block diagram illustrating an example computing system, according to some embodiments.

While embodiments are described herein by way of example for several embodiments and illustrative drawings, those skilled in the art will recognize that the embodiments are not limited to the embodiments or drawings described. It should be understood, that the drawings and detailed description thereto are not intended to limit embodiments to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope as defined by the appended claims. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description or the claims. As used throughout this application, the word “may” is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). Similarly, the words “include”, “including”, and “includes” mean including, but not limited to.

DETAILED DESCRIPTION

According to one embodiment, a data storage system includes a plurality of head nodes and a plurality of data storage sleds mounted in a rack. For a volume or a partition of a volume to be stored in the data storage system, a particular one of the head nodes is designated as a primary head node for the volume or volume partition and another one of the head nodes is designated as a secondary head node for the volume or volume partition. In response to receiving a write request for the volume or volume partition, the head node designated as the primary head node for the volume or volume partition is configured to write data included with the write request to a storage of the head node designated as the primary head node and cause the data included with the write request to be replicated to the other head node designated as the secondary head node. Furthermore, the head node designated as the primary head node for the volume or volume partition is further configured to cause respective parts of the data stored in the storage of the head node to be stored in a plurality of respective mass storage devices each in different ones of the plurality of data storage sleds of the data storage system. For example, a data storage system may store data in a storage of a primary head node and replicate the data to a storage of a secondary head node. Then, after an amount of time has passed, a certain amount of data has been written for the volume partition, or in response to another trigger, the head node may cause the data stored in the storage of the head node to be stored in multiple mass storage devices of different ones of the data storage sleds of the data storage system. For example, data may be stored in mass storage devices of different data storage sleds of a data storage system in a RAID array and may be erasure encoded across the multiple mass storage devices. Such a system may provide varying latencies for accessing stored data and different durabilities of the stored data based on whether the data is stored in storages of the primary and secondary head nodes or stored in multiple mass storage devices of multiple data storage sleds of the data storage system. For example, data stored in a storage of a primary head node may be accessed with lower latencies than data stored across multiple data storage sleds of a data storage system. However, data stored across multiple data storage sleds of a data storage system may have higher durability than data replicated between storages of a primary and secondary head node. Thus, a data storage system may provide low latencies for recently or frequently accessed data stored in head nodes while providing high durability for long term storage of data or for data less frequently accessed stored in data storage sleds. In some embodiments, durability of data stored and replicated in head nodes may be adjusted by varying a number of head nodes that replicate the data. Also, durability of data stored in mass storage devices of data storage sleds of a data storage system may be adjusted by varying a RAID scheme or data encoding procedure used to store the data amongst other techniques to increase data durability.

According to one embodiment, a head node is configured to store data to a log-based storage of the head node and indicate in an index of the head node a location at which the data is stored in the log-based storage. The head node is further configured to perform a data flush operation. For example a data flush operation may flush data stored in the head node to mass storage devices of a data storage system. In order to perform the data flush operation, the head node is configured to read the data stored in the log-based storage of the head node, cause the data to be written to a set of the mass storage devices, and update the index of the head node to indicate one or more locations at which the data is stored on the set of mass storage devices, wherein the data is written to a segment of free storage space across the set of the mass storage devices allocated for the given data flush operation.

According to one embodiment, a method comprises performing a data flush operation including reading data stored in a storage of a head node of a data storage system, wherein the head node stores a reference indicating a location at which the data is stored in the storage of the head node, writing the data to a set of mass storage devices of the data storage system, and updating the reference to indicate one or more locations at which the data is stored on the set of mass storage devices, wherein the data is written to free space on the set of the mass storage devices allocated for the data flush operation.

According to one embodiment, a non-transitory computer readable medium stores program instructions for implementing a data storage system, wherein the program instructions when executed by a processor cause the data storage system to: read data stored in a storage of a head node of the data storage system, wherein the head node comprises a reference indicating a location at which the data is stored in the storage of the head node; write the data to a set of mass storage devices of the data storage system; and update the reference to indicate one or more locations at which the data is stored on the set of mass storage devices, wherein the data is written to a segment of free space across the set of the mass storage devices.

According to one embodiment, a data storage system includes a head node configured to store data for a volume, the data comprising: data representing a current state of one or more portions of the volume and data representing a previous state of at least one portion of the volume. The data storage system also includes a plurality of mass storage devices. The head node is configured to perform a data flush operation comprising: causing the data representing the current state of the one or more portions of the volume and the data representing the previous state of the at least one portion of the volume to be written to a set of the mass storage devices; and updating an index of the head node to indicate one or more locations on the set of mass storage devices at which the data representing the current state of one or more portions of the volume and the data representing the previous state of at least one portion of the volume are stored.

According to one embodiment, a method includes performing a data flush operation for a data volume stored in a data storage system comprising one or more head nodes and a plurality of mass storage devices, wherein the head node stores: data representing a current state of one or more portions of the volume and data representing a previous state of at least one portion of the volume. Performing the data flush operation includes causing the data representing the current state of the one or more portions of the volume and the data representing the previous state of the at least one portion of the volume to be written to a set of the mass storage devices of the data storage system; and updating an index of the head node of the data storage system to indicate one or more locations on the set of mass storage devices at which the data representing the current state of one or more portions of the volume and the data representing the previous state of at least one portion of the volume are stored.

According to one embodiment, a data storage system includes a head node configured to store data representing a current state of one or more portions of a volume and data representing a previous state of at least one portion of the volume, wherein the head node comprises an index indicating one or more locations at which data for the volume is stored. The data storage system also includes one or more mass storage devices configured to store data representing the current state of the one or more portions of the volume and data representing the previous state of the at least one portion of the volume. Further, the data storage system is configured to generate a snapshot copy for the volume based, at least in part, on the index and data stored in the head node or in the one or more mass storage devices.

According to one embodiment, a data storage system also includes one or more computing devices, external to a plurality of data storage units, configured to implement a zonal control plane for partially controlling storage operations related to the plurality of data storage units. In response to a volume creation request, the zonal control plane is configured to assign a particular one of the data storage units to service a volume requested by the volume creation request. Also, for each respective data storage unit, at least one of the head nodes of the respective data storage unit is configured to implement a local control plane for the respective data storage unit, wherein the plurality of head nodes are configured to service read requests and write requests directed to one or more volumes stored in the respective data storage unit independent of the local control plane and the zonal control plane. For example, a data storage system may include data storage units that are configured to service read and write requests without the read and write requests being routed through a local control plane or a zonal control plane of the data storage system. Also, the data storage units of the data storage system may continue to service read and write requests from client devices regardless of whether communication with a local control plane or a zonal control plane of the data storage system is available or lost.

According to one embodiment, respective ones of a plurality of head nodes of a data storage unit are configured to obtain credentials for accessing particular portions of mass storage devices of respective ones of a plurality of data storage sleds of the data storage unit. For example, a head node may receive a credential from a local control plane implemented on one or more of the head nodes of the data storage unit or may receive credentials from a zonal control plane implemented on one or more computing devices external to the data storage unit. Each of the respective sled controllers, in response to a request from a particular head node to write data on a particular portion of a particular mass storage device in a particular data storage sled, is configured to determine whether a credential included with the write request from the particular head node is a valid credential for accessing the particular portion of the particular mass storage device. In response to determining the credential is a valid credential for the particular portion of the particular mass storage device, the respective sled controller is configured to cause the requested write to be performed on the particular portion of the particular mass storage device. Also, in response to determining the credential is an invalid credential for the particular portion of the particular mass storage device, the respective sled controller is configured to decline to perform the requested write and return a message to the particular head node indicating the credential for accessing the particular portion of the particular mass storage device is an invalid credential. For example, if a credential for writing to a particular portion of a mass storage device is issued to a head node functioning as a primary head node for a volume and another head node of the data storage unit attempts to write to the particular portion of the mass storage device without a credential or with an inferior credential that is inferior to the credential held by the primary head node, the sled controller of the data storage sled may enforce the fencing off of the particular portion of the mass storage device for the head node functioning as the primary head node for the volume by refusing to perform the write requested by the other head node of the data storage unit. Also, in some embodiments, a head node functioning as a primary head node may determine that it has been superseded as primary head node by another head node of a data storage unit in response to a write request being denied by a sled controller. Such a scheme may prevent corruption of data caused by a head node attempting to write to a particular portion of a mass storage device after another head node of a data storage unit has taken over as primary head node and assumed exclusive responsibility for writing new data to the particular portion of the mass storage device. In some embodiments, a mass storage device may store a credential associated with a current primary head node, and another head node may determine that it has been superseded as primary head node based on reading the credential stored in the mass storage device without the sled controller denying to perform a write request or issuing a message.

According to one embodiment, a data storage system comprises a plurality of head nodes, for example mounted on a rack, a plurality of data storage sleds, and at least two networking devices. The at least two networking devices are configured to implement at least two redundant networks within the data storage system, wherein to implement the at least two redundant networks each respective head node is coupled to each of the plurality of data storage sleds via a first one of the at least two networking devices, each respective head node is also coupled to each of the plurality of data storage sleds via a second one of the at least two networking devices, and each respective head node is assigned at least two unique network addresses for communicating with the plurality of data storage sleds. For example, a particular head node of a data storage unit may be configured to communicate with external devices via a first path through the first networking device and using a first address, such as a first IP address and also communicate with the external device via a redundant network path through the second networking device and using a second address, such as a second IP address. Also, a head node may be configured to communicate with mass storage devices in separate ones of the data storage sleds mounted in the rack via a first path through the first networking device and through a second path through the second networking device. In some embodiments, a data storage unit may be configured such that only a single network hop is required for a head node to retrieve data stored in data storage sleds of the data storage unit.

Some data storage systems, such as storage area networks (SAN) may allow a server or a pair of servers to access a shared set of storage resources. However, such systems may be susceptible to significant losses in performance due to a server failure. Also, in such systems, data may be durably stored in storage devices of the SAN network, but not durably stored in the servers accessing the SAN network.

In order to provide high durability data storage and low latencies for accessing data, a data storage unit may store data in local storages of head nodes that function as servers for the data storage system, replicate the data to another head node of the data storage unit, and also store the data across multiple mass storage devices in multiple data storage sleds of the data storage unit. Thus, a data storage system that includes a data storage unit may provide low latency input/output operations for data stored in a storage of a head node, while still providing data durability due to the data being replicated to another head node. Furthermore, the data storage system may provide even higher durability for the data once the data is stored in multiple mass storage devices in different data storage sleds of the data storage unit. Thus, a data storage system may provide varying levels of data durability and input/output operation latency depending on whether the data is stored in a storage of a head node and replicated to another head node or whether the data is stored in multiple mass storage devices in different data storage sleds of the data storage system.

In some embodiments, data may be initially stored in a storage of a head node and replicated to a storage of another head node, and may be asynchronously stored to multiple mass storage devices in different data storage sleds that form a RAID array (random array of independent disks) to store the data. In some embodiments, recently stored data or frequently accessed data may remain in a head node storage to allow for low latency access to the data. The data may then be stored to mass storage devices in data storage sleds of a data storage unit of the data storage system after an amount of time has elapsed since the data was last accessed or stored. Storing the data to the mass storage devices may increase the durability of the data as compared to being stored in a storage of a primary head node and being replicated to a storage of a secondary head node. Thus a data storage system may provide different levels of durability and latency based on a staleness or a frequency of access to data stored in the data storage system. In some embodiments, other criteria may be used to determine when data stored in a storage of a head node is to be flushed to mass storage devices of data storage sleds of a data storage unit. For example, data may be collected in a log of a head node and upon an amount of data being stored in the log exceeding a threshold amount, the data may be flushed to mass storage devices of data storage sleds of a data storage unit of the data storage system.

In order to flush data currently stored in a storage of a head node to a set of mass storage devices, a head node of a data storage unit may perform a data flush operation. In order to perform a data flush operation the head node may read data stored in a storage of a head node, construct a segment of data to be written to a set of mass storage devices wherein the segment includes the data read from the storage of the head node. The head node may further cause the segment to be written to a set of mass storage devices of a data storage unit. The head node may then update an index maintained by the head node to indicate a location on the mass storage devices where the data stored on the mass storage devices is located. In some embodiments, a storage of a head node may be a log-based storage. Thus, newly received writes may be written at a head of a log and older writes may be included in the log for some amount of time until they are replaced by new writes to the log. Thus, a log-based storage of a head node may write new data to free space at a head of a log of the log-based storage and maintain older writes in the log for some amount of time. In a similar manner, a segment of free storage space across a set of mass storage devices may be allocated for performing a data flush operation, such that data flushed to mass storage devices is stored in an empty block of free-storage space not currently being used to store customer data. Thus mass storage devices may store newly flushed data for a volume and may also store older data previously flushed for the volume. In some embodiments, a data storage unit may implement a garbage collection mechanism to remove obscelesced data from mass storage devices that no longer represents a current state of a volume serviced by a data storage unit.

Because, in some embodiments, a head node includes a log-based storage that writes newly received data to a head of a log of the log-based storage and flushes data from the log to a block of free storage space across mass storage devices of a data storage unit, the data storage unit may support storing multiple versions of a volume, also referred to herein as “flush views” of a volume. For example, a log of a log-based storage of a head node may store successive writes to a same offset of a volume. In contrast, other storage systems that write data in place, as opposed to a head of a log, may overwrite previous writes to a volume when storing subsequent writes for the volume. Furthermore, because data flushed from a log-based storage to mass storage devices is stored in a block of free storage space across a set of multiple mass storage devices, multiple flush views for a volume may be stored in mass storage devices of a data storage system without subsequent writes overwriting previous flushed writes for a volume.

Furthermore, because data is flushed to a block of free storage space, a size of a given block of free storage space across a set of mass storage devices may vary between successive data flush operations based on an amount of data being flushed. In contrast, a data storage system that writes data in place may partition a set of mass storage devices into portions wherein each portion represents a certain offset of a volume. In such systems, because a partition represents a portion of a volume spanning a certain offset range, the portion of the mass storage devices allocated for the given offset range must include sufficient storage space to store an amount of data equivalent to the full offset range of the volume, regardless of whether or not the full offset range is currently being used to store volume data. Thus, in such systems data storage space on mass storage devices may be allocated but unused. In contrast, a data storage system that flushes data to a block of free data storage space across a set of mass storage devices may utilize an amount of data storage space on the mass storage devices necessary to store the data being flushed without reserving additional data storage space that is not used to store data for the volume. Thus, such a system may compress data stored on mass storage devices for a volume as compared to systems that write data in place and that reserve amounts of data storage space on mass storage devices that span a full volume offset range regardless of how much data is actually written to the offset range.

In some embodiments, a data storage unit of a data storage system may include multiple head nodes, multiple data storage sleds, and at least two networking devices. The data storage unit may further include connectors for coupling the data storage unit with at least two separate power sources. The data storage unit may also include at least two power distribution systems within the data storage unit to provide redundant power to the head nodes, the data storage sleds, and the networking devices of the data storage unit. Furthermore, the at least two networking devices of the data storage unit may implement at least two redundant networks within the data storage unit that enable communications between the head nodes of the data storage unit and the data storage sleds of the data storage unit. Furthermore, the at least two networking devices of the data storage unit may implement at least two redundant networks within the data storage unit that enable communications between the head nodes of the data storage unit and external clients of the data storage unit. In some embodiments, a data storage unit that includes redundant networks and redundant power may provide high reliability and data durability for data storage and access while storing data locally within devices mounted within a single rack.

In some embodiments, a data storage unit of a data storage system may include multiple head nodes that are assigned network addresses that are routable from devices external to the data storage unit. Thus, external clients may communicate directly with head nodes of a data storage unit without the communications being routed through a control plane of the data storage system that is external to the data storage unit, such as a zonal control plane. Also, a data storage system that includes multiple data storage units may implement a zonal control plane that assigns volumes or volume partitions to particular ones of the data storage units of the data storage system. Also, a zonal control plane may coordinate operations between data storage units, such as rebalancing loads by moving volumes between data storage units. However, a data storage unit may also implement a local control plane configured to perform fail over operations for head nodes and mass storage devices of data storage sleds of the data storage unit. Because head nodes of a data storage unit may communicate directly with client devices and because a local control plane may manage fail over operations within a data storage unit, the data storage unit may operate autonomously without relying on a zonal control plane to service reads and writes once a volume has been created on the data storage unit.

In some embodiments, in order to prevent corruption of data stored in mass storage devices of a data storage system, a data control plane may be at least partially implemented on a sled controller of a data storage sled of the data storage system. The data storage sled may include multiple mass storage devices serviced by the sled controller. Also, portions of respective mass storage devices of a particular data storage sled may be reserved for a particular volume serviced by a particular head node functioning as a primary head node for the particular volume. In order to reserve the portions for the particular volume or a volume partition of the particular volume, a sled controller of a data storage sled may provide a token to a head node requesting to reserve the portions. Once the portions are reserved for the particular volume by the head node acting as the primary head node, the head node while acting as a primary head node for the particular volume, may provide the token to the sled controller along with a write request when writing new data to the portions. The sled controller may verify the token and determine the head node is authorized to write to the portions. Also, the sled controller may be configured to prevent writes from head nodes that are not authorized to write to the particular portions of the mass storage devices of the data storage sled that includes the sled controller. The sled controller may refuse to perform a write request based on being presented an invalid token or based on a token not being included with a write request.

In some embodiments, a control plane such as a local control plane or a zonal control plane of a data storage system may issue unique sequence numbers to head nodes of the data storage system to indicate which head node is a primary head node for a particular volume or volume partition. A primary head node may present a sequence number issued from a control plane to respective ones of the sled controllers of respective ones of the data storage sleds to reserve, for a particular volume or volume partition, respective portions of mass storage devices serviced by the respective ones of the respective sled controllers. In response, the sled controllers may issue a token to the primary head node to be included with future write requests directed to the respective portions.

In order to facilitate a failover operation between a primary head node and a secondary head node, a control plane may issue new credentials, e.g. a new sequence number, to a head node assuming a role of primary head node for a volume or volume partition. The newly assigned primary head node may present the credentials, e.g. new sequence number, to respective sled controllers to receive respective tokens that supersede tokens previously used to a previous head node acting as a primary head node for a particular volume or volume partition that had data stored in portions of mass storage devices service by the sled controller. Thus, during a fail over event, a previous primary head node may be fenced off from portions of mass storage devices to prevent corruption of data stored on the mass storage devices during the failover event.

FIG. 1 illustrates a data storage unit comprising head nodes and data storage sleds, according to some embodiments. Data storage unit 100, which may be included in a data storage system, includes network switches 102 and 104, head nodes 106 and data storage sleds 134-144 on shelves 118. Each data storage sled 134-144 includes a sled controller 112 and mass storage devices 110. The head nodes 106, data storage sleds 134-144, and network switches 102 and 104 are mounted in rack 130. In some embodiments, networking devices, such as network switches 102 and 104, may be mounted in a position adjacent to and external from a rack of a data storage unit, such as rack 130 of data storage unit 100. A data storage unit may have redundant network connections to a network external to the data storage unit, such as network 128 that is connected to both network switch 102 and network switch 104. In some embodiments, components of a data storage unit, such as network switches 102 and 104, head nodes 106, and data storage sleds 134-144 may be connected to redundant power sources. For example, power connections 108 indicate power connections for network switches 102 and 104, head nodes 106, and data storage sleds 134-144. Note that power connections 108 are illustrated as a power symbol for simplicity of illustration, but may include various types of power connectors and power distribution systems. For example, power connectors of data storage unit components, such as head nodes and data storage sleds, may couple to dual power distribution systems within a data storage unit that receive power from dual power sources. In some embodiments, a data storage unit may include more than two redundant power distribution systems from more than two redundant power sources.

Each head node of a data storage unit, such as each of head nodes 106, may include a local data storage and multiple network interface cards. For example, a head node may include four network ports, wherein two network ports are used for internal communications with data storage sleds of a data storage unit, such as data storage sleds 134-144, and two of the network ports are used for external communications, for example via network 128. In some embodiments, each head node may be assigned two publicly routable network addresses that are routable from client devices in network 128 and may also be assigned two local network addresses that are local to a data storage unit and are routable for communications between the head node and data storage sleds of the data storage unit. Thus, a data storage unit, such as data storage unit 100, may include multiple redundant networks for communications within the data storage unit. In some embodiments, publicly routable network addresses may be used for internal communications between head nodes and data storage sleds and a head node may be assigned four publicly routable network addresses that are routable from client devices in network 128. The data storage unit may also include redundant power distribution throughout the data storage unit. These redundancies may reduce risks of data loss or downtime due to power or network failures. Because power and network failure risks are reduced via redundant power and network systems, volumes may be placed totally or at least partially within a single data storage unit while still meeting customer requirements for reliability and data durability.

Also, one or more head nodes of a data storage unit, such as one or more of head nodes 106, may function as a head node and additionally implement a local control plane for a data storage unit. In some embodiments, a local control plane may be implemented in a logical container separate from other control and storage elements of a head node. A local control plane of a data storage unit may select amongst any of the head nodes, such as any of head nodes 106, of the data storage unit when selecting a head node to designate as a primary head node for a volume or volume partition and may select amongst any of the remaining head nodes of the data storage unit when selecting a head node to designate as a secondary head node for the volume or volume partition. For example a first one of head nodes 106 may be designated as a primary head node for a volume or volume partition and any of the remaining head nodes 106 may be selected as a secondary head node for the volume or volume partition. In some embodiments, a given one of the head nodes 106 may be designated as a primary head node for a given volume or volume partition and may also be designated as a secondary head node for another volume or volume partition.

Additionally, any head node may be assigned or select columns of space on mass storage devices in any of the data storage sleds of a data storage unit for storing data for a particular volume or volume partition. For example, any of head nodes 106 may reserve columns of space in mass storage devices 110 in any of data storage sleds 134-144. However, any particular column of space of a mass storage device may only be assigned to a single volume or volume partition at a time.

Because multiple head nodes and multiple data storage sleds are available for selection, a failure of a particular head node or a failure of a mass storage device in a particular data storage sled may not significantly reduce durability of data stored in the data storage unit. This is because, upon failure of a head node, a local control plane may designate another head node of the data storage unit to function as secondary head node for a volume or volume partition. Thus, the volume is only without a secondary head node for a short period of time during which a new secondary head node is being designated and index data is being replicated from the primary head node to the secondary head node. Furthermore, when a head node of a data storage unit fails, other head nodes of the data storage unit may still be able to access data in all of the storage sleds of the data storage unit. This is because no single data storage sled is exclusively assigned to any particular head node, but instead columns of space on individual mass storage devices of the data storage sleds are assigned to particular head nodes for particular volumes or volume partitions. This arrangement greatly reduces the blast radius of a head node failure or a disk failure as compared to other storage systems in which each server has a dedicated set of storage devices.

As discussed in more detail below, in some embodiments, a head node or local control plane of a data storage unit may be configured to replicate data stored on mass storage devices that are located in a data storage sled to other mass storage devices in other data storage sleds. Thus, for example, when a data storage sled with a failed mass storage device is removed from a data storage unit for replacement or repair, data from one or more non-failed mass storage devices in a data storage sled may still be available because the data has been replicated to other data storage sleds of the data storage unit. For example, if a single mass storage device 110 in data storage sled 134 failed, data stored in the remaining mass storage devices 110 of data storage sled 134 may be replicated to mass storage devices 110 in any of data storage sleds 136-144. Thus while data storage sled 134 is removed from data storage unit 100 for repair or replacement of the failed mass storage device 110, data previously stored on the non-failed mass storage devices 110 of data storage sled 134 may still be available to head nodes 106.

Also, a data storage unit, such as data storage unit 100, may perform read and write operations independent of a zonal control plane. For example, each of head nodes 106 may be assigned one or more network addresses, such as IP addresses, that are advertised outside of data storage unit 100. Read and write requests may be routed to individual head nodes at the assigned network addresses of the individual head nodes via networking devices of the data storage unit, such as network switches 102 and 104, without the read and write requests being routed through a control plane external to the data storage unit, such as a control plane external to data storage unit 100.

In some embodiments, a data storage sled, such as one of data storage sleds 134-144, may include a sled controller, such as one of sled controllers 112. A sled controller may present the mass storage devices of the data storage sled to the head nodes as storage destination targets. For example head nodes and data storage sleds may be connected over an Ethernet network. In some embodiments, head nodes, such as head nodes 106 may communicate with mass storage devices 110 and vice versa via sled controllers 112 using a Non-volatile Memory Express (NVMe) protocol, or other suitable protocols. In some embodiments, each head node may be assigned multiple private network addresses for communication with data storage sleds over redundant internal Ethernet networks internal to a data storage unit. In some embodiments, a head node at an I/O processing software layer may perform a local disk operation to write or read from a mass storage device of a data storage sled and another software layer of the head node may encapsulate or convert the I/O operation into an Ethernet communication that goes through a networking device of the data storage unit to a sled controller in one of the data storage sleds of the data storage unit. A network interface of a head node may be connected to a slot on a motherboard of the head node, such as a PCIe slot, so that the mass storage devices of the data storage sleds appears to the operating system of the head node as a local drive, such as an NVMe drive. In some embodiments, a head node may run a Linux operating system or other type of operating system. The operating system may load standard drivers, such as NVMe drivers, without having to change the drivers to communicate with the mass storage devices mounted in the data storage sleds.

In some embodiments, a local control plane may be configured to designate more than one head node as a secondary/back-up head node for a volume or a volume partition and also adjust a number of mass storage devices that make up a RAID array for longer term storage of data for the data volume or volume partition. Thus if increased durability is desired for a particular volume or volume partition, the volume data may be replicated on “N” head nodes and subsequently stored across “M” mass storage devices in data storage sleds of the data storage unit, wherein the number “N” and the number “M” may be adjusted to achieve a particular level of durability. In some embodiments, such an arrangement may allow high levels of durability to be realized without having to store data for a data volume outside of a single data storage unit. Also, in such an arrangement, input/output operations may be performed more quickly because data for a particular volume is stored within a single data storage unit.

Also, a given head node may be designated as a primary head node or a secondary head node for multiple volumes. Furthermore, a zonal control plane of a data storage system or a local control plane of a data storage unit may balance volume placement across head nodes of a data storage unit. Because volumes are distributed amongst the head nodes, variations in peak IOPS to average IOPS may be reduced because while one volume may experience peak load other volumes serviced by a particular head node may experience less than peak IOPS load. In some embodiments, a zonal or local control plane may adjust head node designations or volume assignments to balance loads if volumes on a particular head node experience significantly more IOPS than volumes serviced by other head nodes.

While, FIG. 1 illustrates mass storage devices 110 as solid state drives, any suitable storage device may be used. For example, in some embodiments, storage devices 110 may include hard disk drives. Also, FIG. 1 illustrates networking devices 102 and 104 to be networking switches. However, in some embodiments, other suitable networking devices may be used such as routers, etc.

In some embodiments, a data storage unit, such as data storage unit 100, may be part of a larger provider network system. Also, in some embodiments more than one data storage unit may be included in a block storage service of a provider network. For example, FIG. 2 illustrates such an example provider network, according to some embodiments.

FIG. 2 is a block diagram illustrating a provider network that includes multiple network-based services such as a block-based storage service that implements dynamic resource creation to connect with client resources, according to some embodiments. Provider network 200 may be set up by an entity such as a company or a public sector organization to provide one or more services (such as various types of cloud-based computing or storage) accessible via the Internet and/or other networks to clients 210. Provider network 200 may include numerous data centers hosting various resource pools, such as collections of physical and/or virtualized computer servers, storage devices, networking equipment and the like (e.g., computing device 2100 described below with regard to FIG. 21), needed to implement and distribute the infrastructure and services offered by the provider network 200. In some embodiments, provider network 200 may provide computing resources, such as virtual compute service 240, storage services, such as block-based storage service 220, and/or any other type of network-based services 260. Clients 210 may access these various services offered by provider network 200 via network 270. Likewise network-based services may themselves communicate and/or make use of one another to provide different services. For example, computing resources offered to clients 210 in units called “instances,” such as virtual or physical compute instances, may make use of particular data volumes 226, providing virtual block-based storage for the compute instances. Also, note that any of the data storage units 224 a, 224 b, 224 n may be data storage units such as data storage unit 100 illustrated in FIG. 1.

As noted above, virtual compute service 240 may offer various compute instances, such as compute instances 254 a and 254 b to clients 210. A virtual compute instance may, for example, comprise one or more servers with a specified computational capacity (which may be specified by indicating the type and number of CPUs, the main memory size, and so on) and a specified software stack (e.g., a particular version of an operating system, which may in turn run on top of a hypervisor). A number of different types of computing devices may be used singly or in combination to implement the compute instances of virtual compute service 240 in different embodiments, including special purpose computer servers, storage devices, network devices and the like. In some embodiments instance clients 210 or any other user may be configured (and/or authorized) to direct network traffic to a compute instance. In various embodiments, compute instances may mount, connect, attach or map to one or more data volumes 226 provided by block-based storage service 220 in order to obtain persistent block-based storage for performing various operations.

Compute instances may operate or implement a variety of different platforms, such as application server instances, Java™ virtual machines (JVMs), special-purpose operating systems, platforms that support various interpreted or compiled programming languages such as Ruby, Perl, Python, C, C++ and the like, or high-performance computing platforms) suitable for performing client applications, without for example requiring the client 210 to access an instance.

Compute instance configurations may also include compute instances with a general or specific purpose, such as computational workloads for compute intensive applications (e.g., high-traffic web applications, ad serving, batch processing, video encoding, distributed analytics, high-energy physics, genome analysis, and computational fluid dynamics), graphics intensive workloads (e.g., game streaming, 3D application streaming, server-side graphics workloads, rendering, financial modeling, and engineering design), memory intensive workloads (e.g., high performance databases, distributed memory caches, in-memory analytics, genome assembly and analysis), and storage optimized workloads (e.g., data warehousing and cluster file systems). Size of compute instances, such as a particular number of virtual CPU cores, memory, cache, storage, as well as any other performance characteristic. Configurations of compute instances may also include their location, in a particular data center, availability zone, geographic, location, etc., and (in the case of reserved compute instances) reservation term length.

As illustrated in FIG. 2, a virtualization host, such as virtualization hosts 242 a and 242 n, may implement and/or manage multiple compute instances 252 a, 252 b, 254 a, and 254 b respectively, in some embodiments, and may be one or more computing devices, such as computing device 2100 described below with regard to FIG. 21. Virtualization hosts 242 may also provide multi-tenant hosting of compute instances. For example, in some embodiments, one virtualization host may host a compute instance for one entity (e.g., a particular client or account of virtual computing service 210), while another compute instance hosted at the same virtualization host may be hosted for another entity (e.g., a different account). A virtualization host may include a virtualization management module, such as virtualization management modules 244 a and 244 b capable of instantiating and managing a number of different client-accessible virtual machines or compute instances. The virtualization management module may include, for example, a hypervisor and an administrative instance of an operating system, which may be termed a “domain-zero” or “dom0” operating system in some implementations. The dom0 operating system may not be accessible by clients on whose behalf the compute instances run, but may instead be responsible for various administrative or control-plane operations of the network provider, including handling the network traffic directed to or from the compute instances.

Virtual computing service 240 may implement control plane 250 to perform various management operations. For instance, control plane 250 may implement resource management to place compute instances, and manage the access to, capacity of, mappings to, and other control or direction of compute instances offered by provider network. Control plane 250 may also offer and/or implement a flexible set of resource reservation, control and access interfaces for clients 210 via an interface (e.g., API). For example, control plane 250 may provide credentials or permissions to clients 210 such that compute instance control operations/interactions between clients and in-use computing resources may be performed.

In various embodiments, control plane 250 may track the consumption of various computing instances consumed for different virtual computer resources, clients, user accounts, and/or specific instances. In at least some embodiments, control plane 250 may implement various administrative actions to stop, heal, manage, or otherwise respond to various different scenarios in the fleet of virtualization hosts 242 and instances 252, 254. Control plane 250 may also provide access to various metric data for client(s) 210 as well as manage client configured alarms.

In various embodiments, provider network 200 may also implement block-based storage service 220 for performing storage operations. Block-based storage service 220 is a storage system, composed of one or more computing devices implementing a zonal control plane 230 and a pool of multiple data storage units 224 a, 224 b through 224 n (e.g., data storage units such as data storage unit 100 illustrated in FIG. 1), which provide block level storage for storing one or more sets of data volume(s) 226 a, 226 b through 226 n. Data volumes 226 may be attached, mounted, mapped, or otherwise connected to particular clients (e.g., a virtual compute instance of virtual compute service 240), providing virtual block-based storage (e.g., hard disk storage or other persistent storage) as a contiguous set of logical blocks. In some embodiments, a data volume 226 may be divided up into multiple data chunks or partitions (including one or more data blocks) for performing other block storage operations, such as snapshot operations or replication operations. A volume snapshot of a data volume 226 may be a fixed point-in-time representation of the state of the data volume 226. In some embodiments, volume snapshots may be stored remotely from a data storage unit 224 maintaining a data volume, such as in another storage service 260. Snapshot operations may be performed to send, copy, and/or otherwise preserve the snapshot of a given data volume in another storage location, such as a remote snapshot data store in other storage service 260. In some embodiments, a block-based storage service, such as block-based storage service 220, may store snapshots of data volumes stored in the block-based storage service.

Block-based storage service 220 may implement zonal control plane 230 to assist in the operation of block-based storage service 220. In various embodiments, zonal control plane 230 assists in creating volumes on data storage units 224 a, 224 b, through 224 n and moving volumes between data storage units 224 a, 224 b, through 224 n. In some embodiments, access to data volumes 226 may be provided over an internal network within provider network 200 or externally via network 270, in response to block data transaction instructions.

Zonal control plane 230 may provide a variety of services related to providing block level storage functionality, including the management of user accounts (e.g., creation, deletion, billing, collection of payment, etc.). Zonal control plane 230 may implement capacity management, which may generate and manage a capacity model for storage service 220, and may direct the creation of new volumes on particular data storage units based on the capacity of storage service 220. Zonal control plane 230 may further provide services related to the creation and deletion of data volumes 226 in response to configuration requests.

Clients 210 may encompass any type of client configured to submit requests to network provider 200. For example, a given client 210 may include a suitable version of a web browser, or may include a plug-in module or other type of code module configured to execute as an extension to or within an execution environment provided by a web browser. Alternatively, a client 210 may encompass an application such as a database application (or user interface thereof), a media application, an office application or any other application that may make use of compute instances, a data volume 226, or other network-based service in provider network 200 to perform various operations. In some embodiments, such an application may include sufficient protocol support (e.g., for a suitable version of Hypertext Transfer Protocol (HTTP)) for generating and processing network-based services requests without necessarily implementing full browser support for all types of network-based data. In some embodiments, clients 210 may be configured to generate network-based services requests according to a Representational State Transfer (REST)-style network-based services architecture, a document- or message-based network-based services architecture, or another suitable network-based services architecture. In some embodiments, a client 210 (e.g., a computational client) may be configured to provide access to a compute instance or data volume 226 in a manner that is transparent to applications implemented on the client 210 utilizing computational resources provided by the compute instance or block storage provided by the data volume 226.

Clients 210 may convey network-based services requests to provider network 200 via external network 270. In various embodiments, external network 270 may encompass any suitable combination of networking hardware and protocols necessary to establish network-based communications between clients 210 and provider network 200. For example, a network 270 may generally encompass the various telecommunications networks and service providers that collectively implement the Internet. A network 270 may also include private networks such as local area networks (LANs) or wide area networks (WANs) as well as public or private wireless networks. For example, both a given client 210 and provider network 200 may be respectively provisioned within enterprises having their own internal networks. In such an embodiment, a network 270 may include the hardware (e.g., modems, routers, switches, load balancers, proxy servers, etc.) and software (e.g., protocol stacks, accounting software, firewall/security software, etc.) necessary to establish a networking link between given client 210 and the Internet as well as between the Internet and provider network 200. It is noted that in some embodiments, clients 210 may communicate with provider network 200 using a private network rather than the public Internet.

Data Replication

FIG. 3 is a block diagram illustrating head nodes and data storage sleds of a data storage unit storing block storage data in response to a write request, according to some embodiments. Head nodes 306 illustrated in FIG. 3 may be the same as head nodes 106 illustrated in FIG. 1. Also, data storage sleds 326 may be the same as data storage sleds 134-144 illustrated in FIG. 1.

As discussed above, a data storage system that includes a data storage unit, may store volume data in a data storage of a first head node designated as a primary head node for a volume or volume partition and may also replicate the volume data to a second head node designated as a secondary head node for the volume or volume partition. For example, at time 1, a write request 302 is routed to head node 306 that is designated as a primary head node for a volume or volume partition. At time 2 subsequent to the write request being received at head node 306, data included with the write request is stored in storage 314 of primary head node 306 and primary head node 306 causes the data included with the write request to be replicated to storage 316 of secondary head node 308. Replication of the data to secondary head node 306 is performed concurrently or nearly concurrently with storing the data in storage 314 of primary head node 306. Also, as shown in FIG. 3 at time 2, replication of the data to the secondary head node may include the secondary head node sending an acknowledgment back to the primary head node indicating that the data has been replicated to the secondary head node. Subsequently at time 3, which is also nearly concurrent with the data being stored in the storage of the primary head node and the data being replicated to the secondary head node, the primary head node, head node 306, may issue an acknowledgement 320 to the client device that requested write 302 has been committed in data storage system 300.

In some embodiments, a write request, such as write request 302, may be concurrently received at a primary head node and a secondary head node. In such embodiments, the primary head node may verify that the secondary head node has committed the write before acknowledging at time 3 that the write has been committed in the data storage system.

At a later point in time 4, e.g. asynchronous to times 1-3, the primary head node, e.g. head node 306, may cause data stored in storage 314, that includes the data included with the write request and that may include additional data stored before or after the write request, to be flushed to mass storage devices 322 of the data storage sleds 326 of the data storage unit. For example, at time 4 data is flushed to mass storage devices 322 of data storage sleds 326. In some embodiments, data is divided into portions and stored across a set of multiple mass storage devices, each in a different sled and/or on a different shelf of a data storage unit. In some embodiments, data is also erasure encoded when stored in mass storage devices of data storage sleds. For example, data flushed from storage 314 of head node 306 may be divided into six portions where each portion is stored in a different mass storage device of a different data storage sled on a different shelf of a data storage unit 350 of data storage system 300 and is also erasure encoded across the different mass storage devices. For example data portions are stored in sled A of shelf 1, sled B of shelf 2, sled A of shelf 3, sled C of shelf 4, sled B of shelf 5, and sled C of shelf 6.

Also, as can be seen in FIG. 3, a data storage unit, such as data storage unit 350, may include “M” number of shelves and “N” number of head nodes. The portions of data may be stored on portions of mass storage devices 322 in the respective data storage sleds 326. In order to distinguish between a portion of data and a portion of space on a mass storage device, a portion of space on a mass storage device may be referred to herein as a “column” of a mass storage device. Furthermore, a set of columns of mass storage devices that store different portions of data of a volume such as the columns shown in sled A of shelf 1, sled B of shelf 2, sled A of shelf 3, sled C of shelf 4, sled B of shelf 5, and sled C of shelf 6 may collectively make up what is referred to herein as an “extent.” For example, in an erasure encoded RAID six array, an extent may include six columns that collectively make up the RAID array. Four of the columns may store striped data and two of the columns may store parity data. In some embodiments, other replication algorithms other than erasure encoding may be used such as quorum algorithms, etc.

In some embodiments, each column of an extent may be in a different fault domain of a data storage unit. For example, for the extent being stored in FIG. 3 each column is located in a different data storage sled that is mounted on a different shelf of the data storage unit 350. Thus a failure of a sled controller, such as one of sled controllers 324, may only affect a single column. Also if a power supply of a data storage sled fails it may only affect a single data storage sled or if a part of a power distribution system fails it may affect a single shelf. However, because each column of an extent may be located in a different shelf, a shelf level power event may only affect a single column of the extent.

In some embodiments, a head node of a data storage unit, such as one of head nodes 304, 306, 308, or 310, may implement a local control plane. The local control plane may further implement an extent allocation service that allocates extents to head nodes designated as a primary head node for a volume or volume partition. In some embodiments, an extent allocation service may allocate a set of extents to a particular volume referred to herein as a “sandbox.” The primary head node for the particular volume may then select extents to store data on during a data flush from the primary head node to data storage sleds of the data storage unit by selecting an extent from the sandbox allocated for the particular volume.

In some embodiments, if insufficient space is available in the particular volume's sandbox or if a particular placement would cause a data durability of data to be stored to fall below a minimum required durability for the particular volume, a primary head node for the particular volume may select columns outside of the particular volume's sandbox to write data for the particular volume. For example, a sandbox may include multiple columns that make up multiple extents in different ones of the data storage sleds 326 on different ones of the shelves of a data storage unit 350. A primary head node may be able to flush data to columns within a particular volume's sandbox without having to request extent allocation from a local control plane that implements an extent allocation service. This may further add durability and reliability to a data storage unit because a primary head node for the particular volume may continue to flush data even if communication is lost with a local control plane within the data storage unit. However, if space is not available or a placement would cause durability for a particular volume or volume partition to fall below a minimum threshold, a primary head node may flush data to columns outside of the particular volume's sandbox. In some embodiments, a primary head for a particular volume may flush data to columns outside the primary head node's sandbox without requesting an allocation from a local control plane that implements an extent allocation service. For example, a primary head node may store addresses for each sled controller in a data storage unit and may flush data to any sled controller in the data storage unit that is associated with mass storage devices with available columns.

As will be discussed in more detail in regard to FIG. 19, a sled controller of a data storage sled, such as sled controller 324, may implement a fencing protocol that prevents a primary head node from writing to columns for which another primary head node has assumed control after the primary head node has been superseded by another head node assuming the role of primary head node for a particular volume or volume partition. It should be pointed out that a secondary head node or other back-up head nodes may not flush data to data storage sleds and flushing may be limited to only being performed by a primary head node.

Because for a particular volume, the volume's data may be stored in a storage of a primary head node and replicated to a secondary head node and may later be flushed to being stored across a segment of an extent of mass storage devices in different data storage sleds of a data storage unit, an index with references to where the data is stored may be used for subsequent read requests and write requests to locate the data. Also in some embodiments, storages of a head node may be log-structured such that incoming write request are written to the head of the log of the head node's log-structured storage. An index entry may be added indicating where the written data is stored in the head node's log and subsequently the index may be updated when the written data is flushed from the log of the primary head node to a segment of an extent comprising columns of mass storage devices of the data storage system.

FIGS. 4A-4B are block diagrams illustrating a log-structured storage and an index of a head node storage, according to some embodiments. Head node 402 includes storage 404 that includes log 408 and index 406. Volume data may be stored in log 408 prior to being flushed to mass storage devices of a data storage unit. Index information 410 may include an entry for the volume data and a corresponding reference to where the volume data is stored. For example, index information 410 indicates that data for volume 1, offset A, length B is stored in log storage 408 at log segment C and offset D. In some embodiments, a log of a head node such as log 408 of storage 404 of head node 402 may store data for more than one volume. For example, index information 410 also includes an entry for volume 2 offset E, length F and a corresponding reference indicating the data for this volume entry is stored in log 408 at log segment G, offset H.

While FIGS. 4A-B illustrate log storage 408 and index 406 as separate from each other, in some embodiments, an index, such as index 406, may lay on top of a log or side-by-side with a log, such as log storage 408.

When data for a volume is flushed from a storage of a head node to being stored in a segment of an extent across multiple mass storage devices of a data storage unit, the data for the volume may be removed from a log of a head node storage and an index of the head node storage may be updated to indicate the new location at which the data for the volume is stored. For example, in FIG. 4B, index information 412 indicates that data for volume 1, offset A, length B is now stored at extent A and data for volume 2, offset E, length F is now stored at extent B. Note that the labels “extent A” and “extent B” are used for ease of illustration. In some embodiments, an index may include addresses of data storage sleds where the data for the volume is located, such as local IP addresses of the data storage sleds, and addresses of the columns of the mass storage devices within the data storage sleds. Furthermore, an index may include offset information indication where in a given column of an extent a segment of data flushed to the extent is stored. In some embodiments, an index may include another label such as “extent A” where each head node stores information for locating “extent A” or may consult an extent allocation service for locating “extent A.” In some embodiments, an index may include addresses of data storage sleds where the data for the volume is located and sled controllers of the data storage sleds may be able to determine the appropriate columns and offsets based on volume IDs stored in respective columns allocated to the volume.

When a read request is received by a head node designated as a primary head node for a volume, the head node may consult an index of a storage of the head node, such as index 406 of storage 404, to determine what is the latest version of the volume's data and where the latest version of the volume's data is stored. For example a primary head node, such as head node 402, may consult the primary head node's index, such as index 406, to determine if the latest version of the volume's data is stored in the head node's log, such as log 408, or is stored in an extent comprising mass storage devices of the data storage unit.

FIG. 5 illustrates a partial view of a data storage unit that stores portions of a volume partition in multiple mass storage devices in multiple data storage sleds on multiple shelves of the data storage unit, according to some embodiments. FIG. 5 illustrates an example storage pattern for extent A from index 406 in FIG. 4B. Extent A from index 406 illustrated in FIG. 4B is shown as extent A 502 in FIG. 5 Also, an example storage pattern for extent B from index 406 illustrated in FIG. 4B is shown in FIG. 5 as extent B 504. Note that a data storage sled may include multiple columns of multiple extents. Also, in some embodiments a single mass storage device may include multiple columns of multiple extents.

FIGS. 6A-B illustrate columns of mass storage devices storing different portions of a volume partition, according to some embodiments. FIG. 6A illustrates an embodiment in which data flushed to extent A, which may be the same extent A as described in FIGS. 4 and 5, is erasure encoded across 4+2 columns. The striped data 602 may include the original data flushed from log 408 divided into multiple portions and the parity data 604 may include encoded data that allows the flushed data to be recreated in case of failure of one or more of the mass storage devices or sleds that include one of the columns. FIG. 6B illustrates a similar embodiment where extent B is erasure encoded across four striped data columns 606 and two parity columns 608. Note that in FIG. 6B the data is stored in a different location in the column than is shown in FIG. 6A. This is intended to illustrate that the columns shown in FIG. 6B may already store data previously written to the columns of extent B, whereas the data being written to extent A may be the first segment of data written to extent A. Also, it is worth noting that for a particular volume, multiple extents may be assigned to store data of the volume. In some embodiments, an extent may represent a fixed amount of storage space across a set number of columns of mass storage devices. When an extent is filled for a particular volume, another extent may be allocated to the volume by a head node or an extent allocation service. FIGS. 6A and 6B illustrate an example RAID level and erasure encoding technique. However, in some embodiments various other RAID levels may be used and various data coding techniques may be used to increase durability of stored data. It also worth noting that erasure encoding data may reduce a number of columns needed to achieve a particular level of durability. For example, data stored that is not erasure encoded may require the data to be stored redundantly across 8 columns to achieve a given level of durability, whereas a similar level of durability may be achieved by erasure encoding the data across fewer columns. Thus erasure encoding data may significantly reduce an amount of storage resources that are needed to store data to a particular level of durability. For example, data erasure encoded according to a 4+2 erasure coding scheme may be recreated from any four of the six columns, wherein the six columns include four columns of striped data segments and two columns of parity data segments.

In some embodiments, a data storage system may implement one or more communication protocols between head nodes and data storage sleds of the data storage system that allow for rapid communications between the head nodes and the data storage sleds. Thus, high levels of performance may be provided to clients of a data storage system despite volume data being erasure encoded across multiple columns of mass storage devices in different data storage sleds. For example, a data storage system may implement a protocol for reliable out-of-order transmission of packets as described in U.S. patent application Ser. No. 14/983,436 filed on Dec. 29, 2015, which is herein incorporated by reference. Also, for example, a data storage system may implement a protocol for establishing communication between a user application and a target application wherein the network does not require an explicit connection between the user application and the target application as described in U.S. patent application Ser. No. 14/983,431 filed on Dec. 29, 2015, which is herein incorporated by reference. In some embodiments, implementation of such protocols may permit data erasure encoded across multiple mass storage devices in multiple different data storage sleds to be read by a head node in a timely manner such that, from a perspective of a client device of the data storage system, performance is comparable to a system that does not erasure encode volume data across multiple mass storage devices or such that performance exceeds a performance of a system that does not erasure encode volume data across multiple mass storage devices.

FIG. 7 is a high-level flowchart illustrating operations performed by a head node in response to a request to store data in a data storage unit, according to some embodiments.

At 702, upon receiving a write request from a client device, wherein the write request is directed to a particular volume for which the head node is functioning as a primary head node, the head node writes data included with the write request to the log of the head node and updates the index of the head node to include an entry for the volume data and a reference indicating where the volume data is stored.

At 704, the primary head node causes the data included with the write request to be replicated to the secondary head node. The secondary head node then stores the data in a log of the secondary head node and updates an index of a storage of the secondary head node to include an entry for the volume data and a pointer indicating where the volume data is stored. The secondary head node may then send an acknowledgement to the primary head node indicating that the data has been replicated in the secondary head node's storage. In some embodiments, the primary head node then issues an acknowledgement to the client device indicating that the requested write has been persisted in the data storage system. In some embodiments, replication between head nodes could be primary and secondary e.g. master/slave replication. In some embodiments, other replication techniques such as a Paxos protocol, other consensus protocol, etc. may be used to replicate data between head nodes.

At 706, the primary head node determines if the log data of the primary head node exceeds a threshold that would trigger the log data or a segment of the primary head node's log data to be flushed to a segment of an extent that include columns of mass storage devices of data storage sleds of a data storage unit that includes the head node. In some embodiments, a threshold to trigger data to be flushed may include: an amount of data stored in the log or in a portion of the log, an amount of time that has elapsed since the data was last accessed or altered, a frequency at which the data is accessed or altered, or other suitable thresholds. In some embodiments, data flushed from a log of a head node may only include a portion of the data written to the log of the head node or a segment of the log of the head node. For example, older data stored in a log of a head node may be flushed while more recently written data may remain in the log of the head node. In some embodiments, a frequency of flush operations from a log of a head node may be throttled based on a variety of factors, such as a fill rate of the log of the head node or based on an amount of write requests being received by the head node or being received for a particular volume serviced by the head node.

In response to determining the threshold has not been met, the primary head node continues to write data to the log and reverts to 702.

At 708, in response to determining that the threshold has been met or exceeded, the primary head node causes data stored in the log of the primary head node or a segment of the log of the primary head node to be flushed to a segment of an extent comprising columns of mass storage devices in different ones of a plurality of data storage sleds of the data storage unit.

At 710, the primary head node updates the log of the primary head node to include a reference for the volume data indicating that the flushed volume data is now stored in particular columns of mass storage devices or an extent that includes multiple columns of mass storage devices.

At 712, the primary head node causes the secondary head node to update an index of the secondary head node to indicate the new location of the volume data. The secondary head node also releases the log space in the secondary head node that previously stored the replicated volume data.

At 714, the head node acting as primary head node also releases space in the primary head node's log. In some embodiments, a garbage collection mechanism may cause log space to be released based on inspecting an index of a storage of a head node. In some embodiments, releasing log storage space may be performed concurrently with flushing log data or may be performed at some time subsequent to flushing log data.

FIG. 8A is a high-level flowchart illustrating operations performed by a head node in response to a failed mass storage device in a data storage sled of a data storage unit, according to some embodiments.

At 802, a head node or a sled controller detects a failed mass storage device in a particular data storage sled. For example, a data storage sled may include multiple mass storage devices, such as solid state storage drives, and one of the mass storage devices may fail. In some embodiments, a data storage sled may include disk drives and one of the disk drives may fail. In some embodiments, a data storage sled may include other types of mass storage devices.

At 804, a head node acting as a primary head node for a volume with extents that include one or more columns on the failed mass storage device or a local control plane for the data storage unit causes the extents that include columns on the failed mass storage device to be replicated to other extents that include columns on other mass storage devices in other sleds of the data storage unit. For example, in a 4+2 erasure coding scheme data from any one lost mass storage drive can be recreated based on data stored on the other mass storage devices that make up an extent. Thus, data previously stored on the failed mass storage device can be recreated and replicated to data storage sleds that do not include a failed mass storage device.

At 806, indexes of a primary head node and a secondary head node that are designated for each volume that included an extent in the failed mass storage device are updated to indicate the new locations of the data for the volumes.

In some embodiments, a data storage system may continue to operate a data storage sled that includes a failed mass storage device, such as the failed mass storage device at 808. In some embodiments, step 806 may be omitted and all extents stored on mass storage devices in the data storage sled that includes the failed mass storage device may be replicated to other data storage sleds. Because the extents that include columns on the failed mass storage device have been replicated to data storage sleds that do not include failed mass storage devices, the durability of the data previously stored on the failed mass storage device has been recovered to the original level of durability. For example in a RAID configuration of six segments, the number of segments is returned to six by replicating the data from the failed mass storage device to other mass storage devices in the data storage unit.

FIG. 8B is a high-level flowchart illustrating operations performed by a head node in response to a failed mass storage device in a data storage sled of a data storage unit, according to some embodiments.

In some embodiments, a data storage system may tolerate one or more failed mass storage devices in a particular sled before the mass storage devices are replaced. For example, at 852 one or more additional failed mass storage devices are detected in a data storage sled. In some embodiments the additional failed mass storage devices may be in the same data storage sled as the failed mass storage device described in FIG. 8A or may be in a different data storage sled of the data storage unit.

At 854, data from other non-failed mass storage devices each in a data storage sled that includes a failed mass storage device is copied to other mass storage devices in other data storage sleds of the data storage unit. In some embodiments, only data from non-failed mass storage devices that are included in a data storage sled that is to be repaired may be copied. In some embodiments, copying the data from the non-failed mass storage devices may include recreating the data from a set of columns stored on remaining non-failed mass storage devices and then erasure encoding the data across another set of columns of mass storage devices of a replacement extent. For example, in a 4+2 erasure encoding scheme, data of an extent may be recreated from any four of the six columns of the extent. After being recreated, the data may be erasure encoded across another set of 4+2 columns of a replacement extent.

At 856, indexes of a primary head node and a secondary head node that are designated for each volume that included an extent in the affected mass storage devices are updated to indicate the new locations of the data for the volumes that has been copied to other mass storage devices in the data storage unit.

At 858, the data storage sled(s) that includes the failed mass storage device is at least partially removed from the data storage unit and the failed mass storage device is replaced. Because data previously stored on the non-failed mass storage devices of the data storage sled being removed has been copied to other mass storage devices of the data storage unit, the data remains available even while the data storage sled is at least partially removed from the data storage unit.

At 860, the data storage sled with the replaced mass storage device is re-installed in the data storage unit. At 862 mass storage devices of the replaced data storage sled are made available for allocation of columns on the mass storage devices of the data storage sled. In some embodiments, data storage space of the non-failed mass storage devices of the data storage sled may be released and made available to store data for newly allocated extents. In some embodiments, the non-failed mass storage devices may still store volume data that has been copied to other mass storage devices in the data storage unit. In some embodiments, the indexes of the respective head nodes may be updated to indicate volume data that is still stored on the non-failed mass storage devices.

Data Flush Operation

In some embodiments, a data flush mechanism may support flush views that allow multiple versions of data for a volume to be saved in a data storage system while continuing to process reads and writes for a current version of the volume. Furthermore, in some embodiments, a data flush mechanism may allow data to be compressed when flushed to data storage sleds of a data storage unit. Also, in some embodiments, a data flush mechanism, may persist one or more bitmaps indicating data written to a head node of a data storage unit but not yet flushed to mass storage devices of the data storage unit. A persisted bitmap of stored but not yet flushed data may allow a secondary head node that becomes a primary head node (for example, in a fail-over process) to pick up flushing data where a previous primary head node left off (for example, prior to the fail-over process). Thus, a secondary head node that becomes a primary head node may be prevented from flushing data already flushed by a previous primary head node prior to a fail-over process. In order to persist the bitmap, the bitmap may be stored on more than one head node of a data storage system or in one or more mass storage devices of a data storage system.

FIG. 9 is a high-level flowchart illustrating operations performed by a head node of a data storage system in relation to flushing data to mass storage devices of the data storage system, according to some embodiments.

At 902 a head node of a data storage system acting as primary head node for a volume tracks data written to the volume and stored in a storage of the head node that has not yet been flushed to mass storage devices of the data storage system. As described in more detail in FIG. 10, in some embodiments, a volume may be divided into volume portions that span offset ranges of the volume. These portions of a volume may be represented by “flusher chunks.” When data is written to an offset range of a volume corresponding to a given flusher chunk, the data may be stored at a head of a log of a log-based storage of a head node and an index of flusher chunks for the volume may be updated to indicate that there is data written that is stored in the storage of the head node but not yet flushed to mass storage devices of the data storage system for the given flusher chunk. In some embodiments, a head node may track a quantity of flusher chunks for which data has been written to the storage of the head node but not yet flushed to the mass storage devices, and based, at least in part, on an amount of data written but not yet flushed exceeding a threshold amount, the head node may perform a data flush operation. For example, in some embodiments, each flusher chunk may represent an offset range of a volume and may further include sub-portions that each correspond to a block of data of the volume within the offset range represented by the flusher chunk. Based on a number of flusher chunk portions representing blocks of data that are written but unflushed exceeding a threshold amount of data, the head node may perform a data flush operation.

In some embodiments, tracking flusher chunks and portions of flusher chunks, as opposed to tracking each piece of data written to a storage of a head node, may reduce overhead expended by a head node to track data written to a storage of the head node but not yet flushed to mass storage devices. For example, if multiple pieces of data are written to an offset range of a volume corresponding to a portion of a given flusher chunk, a head node may only need to store a single indication that the flusher chunk comprises data written to the storage of the head node but not yet flushed for the portion of the volume (as opposed to having to track each of the multiple pieces of data).

At 904, one or more metrics are determined based on the tracked volume data and at 906 it is determined whether or not the one or more metrics for the volume data written to the storage of the head node but not yet flushed to mass storage devices exceeds one or more thresholds. For example, in some embodiments, the one or more metrics and the one or more thresholds may include one or more of:

-   -   a quantity of data stored in a storage of a head node for a         volume but not yet flushed to mass storage devices and a         threshold data amount for data that has been stored in a storage         of a head node but not yet flushed that triggers a data flush         operation to be performed if exceeded;     -   a rate at which write requests are being written to a volume or         a portion of a volume and a threshold write rate, wherein a         frequency at which data flush operations are performed is         increased if the threshold write rate is exceeded;     -   a rate at which data is being stored to a head node for a volume         or a portion of a volume and a threshold data storage rate,         wherein a frequency at which data flush operations are performed         is increased if the threshold data storage rate is exceeded; or     -   other suitable metrics and thresholds that trigger data flush         operations to be performed such that an amount of data stored in         a storage of a head node does not exceed a capacity of the head         node to store data, and such that data stored in a storage of a         head node remains in the head node when frequently accessed or         modified and is flushed to mass storage devices when less         frequently accessed or modified.

In response to determining at 906 that one or more thresholds are not exceeded by one or more metrics determined based on the tracked volume data, the head node reverts to 902 and continues to track volume data.

At 908, in response to determining that one or more of the thresholds has been exceeded by one or more of the metrics determined based on the tracked volume data, the head node performs a data flush operation. The data flush operation comprises the head node constructing a data segment to be flushed to the mass storage devices by reading data from portions of the volume for which data is stored in the storage of the head node but not yet flushed. For example, a head node may read data stored for flusher chunks that are indicated as comprising data stored in a storage of a head node but not yet flushed to the mass storage devices. At 910, performing the data flush operation further comprises writing the constructed segment to an extent that encompasses a set of columns of a set of mass storage devices of the data storage system. In some embodiments, at 912 a head node may further erasure encode the segment data prior to writing the segment to an extent. At 914, an index of the head node is updated to include a reference to a location(s) in the mass storage devices at which the segment is stored as part of the data flush operation. For example, an index of a head node may be updated to indicate a particular extent at which the flushed data is stored and an offset within that extent. In some embodiments, other formats may be used to indicate a location at which data flushed from a head node is stored on mass storage devices.

In some embodiments, a head node may flush data written to a storage of the head node but not yet flushed to mass storage devices of a data storage system in a first-in-first-out (FIFO) order. For example, as data is written to a log of a head node a list of flusher chunks for which data has been written but not yet flushed may be updated. Data may then be flushed from the storage of the head node to mass storage devices of the data storage system according to the flusher chunk list.

Flusher chunks for which data is newly written may be added to the end of the list. Because flusher chunks are added to the end of the list, flusher chunks with data written but not yet flushed may be ordered in the list based on when data was written. Flusher chunks corresponding with the oldest data written but not yet flushed may be at the front of the list and flusher chunks corresponding with the most recently written data may be at the end of the list. In some embodiments, when data is written to a portion of a volume corresponding to a flusher chunk that is already included in the list, a sub-portion (e.g. bitmap) for the flusher chunk may be updated to show that an additional portion of the volume represented by the flusher chunk has data written to it that has not yet been flushed. However, the flusher chunk may retain its position in the list. Also, in some embodiments, the flusher chunk may be moved to the end of the list when data is newly written to a portion of the volume represented by the flusher chunk.

In some embodiments, a head node may sum the portions of the flusher chunks in the flusher chunk list for which data has been written but not yet flushed. If the sum exceeds a threshold amount of data the head node may perform a data flush operation. For example, each flusher chunk may span 200 KB of an offset range of a volume and may include 10 KB portions. In some embodiments, when a sum of 10 KB portions of the flusher chunks included in the list exceeds a threshold, for example 1 MB, then a data flush operation may be triggered. For example, if 101 or more 10 KB portions of the flusher chunks included in the list have data written to their respective volume portions that have not yet been flushed, a data flush operation may be triggered (for example 101×10 KB>1 MB).

In some embodiments, in addition to performing a data flush operation in response to one or more metrics exceeding one or more thresholds, a head node may from time to time perform a data flush operation even when the one or more thresholds have not been exceeded. For example, if a small amount of data is stored for a volume and additional data is not stored for the volume, in some embodiments, it may be desirable to flush the small amount of data to mass storage devices to increase a durability of the small amount of data even though the small amount of data does not cause one or more metrics for the volume to exceed a threshold. In such situations, a time or age based data flush operation threshold may be exceeded in order to cause a data flush operation to be performed to flush the small amount of data to mass storage devices despite a metrics based data flush operation threshold not being exceeded.

FIG. 10 illustrates an example index used to track portions of a volume for which data has been written to a head node of a data storage system but not yet flushed to mass storage devices of the data storage system, according to some embodiments.

A flusher chunk index may include entries for flusher chunks that span portions of a volume and each flusher chunk may further include sub-portions that span a sub-portion of a portion of a volume spanned by a flusher chunk. For example, flusher chunk index 1002 includes flusher chunks 1004 and 1006. As shown in FIG. 10, flusher chunk 1004 includes sub-portions 1008, 1010, 1012, and 1014. In FIG. 10 each flusher chunk of flusher chunk index 1002 spans an offset range of a volume. In turn, each of sub-portions 1008, 1010, 1012, and 1014 span a smaller offset range within the offset range represented by flusher chunk 1004. Note that numbers for the volume offset ranges of flusher chunks and sub-portions are illustrated in FIG. 10 for ease of illustration. However, in some embodiments any number of combinations of offset ranges may be used for flusher chunks and sub-portions.

Flusher chunk 1004 also includes bitmap 1018 and flusher chunk 1006 includes bitmap 1020. In some embodiments, each bit of a bitmap may correspond to a sub-portion of a flusher chunk. If data is stored in a storage of a head node but not yet flushed to mass storage devices and is stored for a volume offset range that corresponds to a volume offset range represented by a given bit of a flusher chunk bitmap, the corresponding bit of the bitmap may be changed to indicate the presence of stored but not yet flushed data. For example, bit 1022 shows a “1” indicating that data is stored in a storage of a head node for the volume at an offset between 500 KB-510 KB. Also, bit 1024 shows a “0” indicating that data is not stored to a storage of a head node that has not yet been flushed to mass storage devices for the volume at an offset between 510 KB-520 KB. In some embodiments, in order to determine when to perform a data flush operation, a data flush mechanism of a head node may determine a number of bits of a bitmap for a volume or portion of a volume indicating data stored to a storage of a head node but not yet flushed to mass storage devices. Based, at least in part on the determined number of bits exceeding a threshold number of bits, the data flush mechanism of the head node may cause a data flush operation to be performed to flush the data stored to the storage of the head node to mass storage devices of the data storage system. In a similar manner, in some embodiments, a data flush mechanism of a head node may determine a total amount of storage represented by the determined number of bits exceeds a data storage threshold and in response cause a data flush operation to be performed.

In some embodiments, a data storage system may update a bitmap as part of performing a write operation. For example, a primary head node may write data included in a write request to a log of the primary head node and update a bitmap for the primary head node. The primary head node may then cause a secondary head node to replicate the write data included in the write request and update a bitmap for the secondary head node. The secondary head node may subsequently send an acknowledgement to the primary head node that the write data has been replicated to the secondary head node and the primary head node may acknowledge to a client that the write has been committed in the data storage system. In some embodiments, a persisted bitmap stored in more than one head node may be of varying granularities. For example, in some embodiments, a bitmap may include a list of flusher chunks for which data has been written but not yet flushed, but may not include entries for sub-portions of the flusher chunks. In some embodiments, only bits for which data has been written but not yet flushed may be persisted across multiple head nodes. For example, “0” bits may not be replicated. Also, in some embodiments, when a bit moves from “1” to “0”, for example when data is flushed, a corresponding bitmap may not be immediately updated in a primary head node and a secondary head node. For example, a set of bits that have moved from “1” to “0” may be accumulated to form a batch of bits needing to be updated in the primary head node and the secondary head node and the bits may be updated as a batch.

FIG. 11 illustrates an example organizational scheme for an extent comprising multiple segments of data flushed from a head node to a set of mass storage devices, according to some embodiments.

Extent 1100 includes segments 1102, 1104, 1106, and 1108. In some embodiments, an extent may include a set amount of data storage space across a set of mass storage devices. For example, an extent may include reserved columns of storage space on a set of mass storage devices that collectively add up to a fixed amount of storage space. A head node, when performing a data flush operation, may write data to mass storage devices of an extent by writing a segment to the extent, for example one of segments 1102, 1104, 1106, or 1108.

In some embodiments, each segment written to an extent may be the result of a data flush operation that stored data to the extent. Furthermore, a segment may include multiple blocks of data. For example, segment 1106 includes blocks 1112, 1114, 1116, and 1118. In some embodiments, each block may correspond to a portion of a volume. A particular data flush operation may include flushing data stored in a storage of a head node corresponding to multiple flusher chunks and a separate block of a segment may be allocated for data corresponding to separate portions of the flusher chunks. In order to prevent wasted data storage space on an extent, in some embodiments, storage blocks may have different sizes. Thus larger writes or writes to a given portion of a volume that have more data written to them than other writes may have their data written to larger storage blocks of a segment than the other writes. However, in some embodiments, a segment may be of a predetermined length. Thus, a number of data storage blocks included in a segment may vary between data flush operations based on respective sizes of the data storage blocks included in the segment of data being flushed. For example, block 1118 is also labeled as block “n” to indicate that segment 1106 may include “n” number of blocks.

Because storage blocks included in a segment may have variable sizes, a size of a storage block may be smaller than an offset range of a flusher chunk or portion of a flusher chunk corresponding to a portion of a volume from which data that was written to the storage block. For example, a flusher chunk may span 500 KB of an offset range of a volume. However, less than 500 KB may be written to the offset range of the volume corresponding to the flusher chunk, for example only 10 KB of data may be written to a storage of a head node for the offset range of the volume represented by the flusher chunk that has not yet been flushed to mass storage devices. In such a situation, a storage block for the data may be smaller than the 500 KB offset range of the flusher chunk. For example, the storage block may only occupy 10 KB of storage space of the segment. In a similar manner, a portion of a flusher chunk may span 10 KB of an offset range of a volume. However, only 2 KB of data may be written to a storage of a head node for the offset range of the volume represented by the portion of the flusher chunk that has not yet been flushed to mass storage devices. In such a situation, a storage block for the data may be smaller than the 10 KB offset range of the portion of the flusher chunk. Thus, data may be compressed when stored in mass storage devices such that empty space for a volume offset range that does not store data may not be blocked off by the data storage system.

In some embodiments, a segment may include a table of contents, such as table of contents 1110. In some embodiments, a table of contents may list storage blocks included in a segment and may include a mapping between a logical offset of a volume (for example a volume offset range) and a segment offset (for example where in the segment the block is stored).

In some embodiments, a segment of data is flushed to a free segment of an extent. A head node may flush data to a free segment of an extent and upon all free segments of an extent being utilized to store data, a new extent may be allocated to the volume and the head node may flush subsequent segments to the new extent. In some embodiments, a free segment of an extent may be free space across a set of a mass storage devices that does not currently store customer data for the volume or for another volume. In some embodiments, in sequential data flush operations, data may be flushed to sequential free segments. For example, data may be flushed to sequential free segments of an extent as opposed to being written in place to a particular segment during sequential data flush operations.

FIG. 12A-B are a high-level flowcharts illustrating operations performed by a head node of a data storage system that supports flush-views, according to some embodiments.

At 1200 a data storage system comprising a head node and mass storage devices stores data for one or more portions of a volume. For example a data storage system such as the data storage systems described in FIGS. 1-11 may store data for a volume. In some embodiments, a data storage system may receive write requests that include data to be written to one or more portions of a volume and may write the data to a head node of the data storage system. In some embodiments, data for one or more portions written to head node of a volume may subsequently be flushed mass storage devices of a data storage system as described above.

At 1202 a request is received for a point-in-time snapshot copy to be created for a volume. A request may be received by a data storage system via an application program interface (API) or other interface to the data storage system. For example a client of a provider network, such as provider network 200 described in FIG. 2, may make a request for one or more point-in-time snapshots to be created for one or more volumes of the client that are serviced by a block-based storage service, such as block-based storage service 220 illustrated in FIG. 2. In addition, in some embodiments, one or more other services of a provider network may request a block-based data storage service create one or more point-in-time snapshots for one or more volumes serviced by the block-based data storage service. For example, a virtual compute service, such as virtual compute service 240 illustrated in FIG. 2 or one or more of other network-based services 260 may request one or more point-in-time snapshots be created for one or more volumes.

At 1204 an index entry is created for the requested point-in-time snapshot in an index of a head node that services a volume for which the point-in-time snapshot was requested. For example, an index of a head node, prior to receiving a request for a point-in-time snapshot, may include an entry comprising a reference indicating storage location(s) of current data for the volume. Additionally, based on receiving a point-in-time snapshot request, an additional entry may be added to the index of the head node that includes references indicating storage location(s) of data for the volume up until the point-in-time of the point-in-time snapshot. Thus, subsequent to receiving a request to create a point-in-time snapshot, an index may include a current version entry for a volume and one or more additional entries for one or more additional snapshot references for previous points-in-time for the volume.

At 1206, the head node continues to store write data in a storage of the head node, for example in a log of the head node. In response to receiving write requests for the volume, the head node writes data included in the write requests to a storage of the head node and updates the current version entry in the index of the head node to indicate location(s) where current data for the volume is stored. However, the snapshot point-in-time reference is not updated past the given point-in-time of the point-in-time snapshot. Because a log-based storage writes data to a head of a log (as opposed to in-place) newly written data to the log does not overwrite data previously written to the log. Thus, a log of a data storage of a head node may include write data written prior to a point-in-time of a point-in-time snapshot and data written to the log subsequent to the point-in-time of the point-in-time snapshot.

At 1208 it is determined whether or not a data flush operation is triggered for the volume. A data flush operation may be triggered at 1208 in a similar manner as described in relation to FIG. 9. If a data flush operation is not triggered, the head node reverts to 1206 and continues to store write data to the log in response to receiving additional write requests for the volume.

At 1210, in response to a data flush operation being triggered at 1208 a data flush operation is performed by the head node. The data flush operation includes data written to the volume up to the current time (e.g. data referenced by the current version entry in the log) being written to one or more blocks of a segment that is being flushed to an extent across a set of mass storage devices and data written to the volume up to the point-in-time of the point-in-time snapshot (e.g. data referenced by the point-in-time snapshot reference in the index) being written to one or more other blocks of the segment that is being flushed. Thus, both data for the current version of the volume and data representing a previous state of the volume at a point-in-time of the point-in-time snapshot are stored in the mass storage devices of the data storage system subsequent to the data flush operation being performed. In some embodiments, data that is duplicative to both the snapshot point-in-time version and the current version of the volume may not be duplicated in the mass storage devices. For example, in some embodiments, only data that is different from the current version may be written to the data storage sleds in relation to the point-in-time snapshot.

In some embodiments, point-in-time snapshot copies of a volume may be generated based on flushed data maintained in the mass storage devices of a data storage system, based on data stored in a head node of a data storage system that is yet to be flushed, or based on data stored in both a head node and mass storage devices. In some embodiments, current version data of a volume and previous version data of a volume may be included in data blocks of a same segment that is written to an extent across a set of mass storage devices of a data storage system. In some embodiments, a snapshot reference entry in an index of a head node may indicate one or more locations on a head node where data for some portions of a previous state of a volume are stored and may indicate one or more locations on a set of mass storage devices where data for other portions of a previous state of a volume are stored. In some embodiments, current state data for one or more portions of a volume may be stored in a head node, mass storage devices, or a combination of both. A current version reference of an index may indicate locations in the head node and/or the mass storage devices where the current version data is stored. In some embodiments, only some portions of a point-in-time snapshot version of a volume may vary from a current version of the volume. For example, one or more particular offset ranges of a volume may have data written to them subsequent to a point-in-time of a point-in-time snapshot while other offset ranges of a volume may have not been altered since a point-in-time of a point-in-time snapshot. In such situations, for some portions of a volume that have not been altered since a point-in-time snapshot was requested, a current version reference and a snapshot reference of an index of a head node may indicate a same storage location in a head node or one or more mass storage devices for such portions of the volume. In some embodiments, a snapshot reference may only indicate locations of data for portions of a volume that differ from a current version of the volume.

At 1212 a request is received for a point-in-time snapshot copy of a volume. For example, a client that previously submitted a request to create a point-in-time snapshot of a volume or another entity may later request to receive a copy of the volume that corresponds to a previous state of the volume at the point-in-time of the point-in-time snapshot.

At 1214 a point-in-time snapshot copy is generated for the volume. In order to generate the point-in-time snapshot copy, a head node may read data from storage locations indicated by a snapshot reference for the volume included in an index of the head node. The snapshot reference may correspond to the point-in-time snapshot. In some embodiments, an index may include multiple snapshot references for different points in time and a request for a point-in-time snapshot copy may specify a point-in-time of the requested point-in-time snapshot copy. In some embodiments, the snapshot reference may indicate one or more locations in a log-based storage of a head node where previous state data for one or more portions of a snapshot of the volume are stored in the log-based storage of the head node. Also, the snapshot reference may indicate one or more locations on mass storage devices of a data storage system where previous state data for one or more portions of a snapshot of a volume are stored. In some embodiments, a snapshot reference may indicate one or more locations in a head node for data for some portions of a volume and may indicate one or more locations in a set of mass storage devices for other portions of a volume. In some embodiments, a snapshot reference may only indicate locations for previous state data for portions of a volume for which previous state data differs from current state data.

In some embodiments, a head node may combine data for multiple portions of a volume read from different locations in a head node and/or mass storage devices to generate a snapshot copy of the volume at a particular point in time. In some embodiments, a data storage system may provide a snapshot copy of a volume to a client in response to a request for the snapshot copy of the volume. In some embodiments, a data storage system may retain the data for the previous state of the volume at the point-in-time of the snapshot copy subsequent to providing the snapshot copy of the volume to the client.

In some embodiments, a snapshot copy may be exported to another system. For example, in some embodiments, a snapshot copy of a volume may be generated according to a point-in-time snapshot reference and data stored in the head node and in the mass storage devices and may be exported to another storage service of a provider network, such as a long term storage service. At 1216 snapshot copies are exported to another system. In some embodiments, 1216 may be omitted. In some embodiments, generating a snapshot copy may include reading data, according to the point-in-time snapshot reference entry in the index for the volume, from multiple blocks, segments, and/or extents and constructing a snapshot copy of the volume for a given point-in-time based on the data read from the multiple blocks, segments, and/or extents. In some embodiments, once a snapshot copy is generated, it may be exported to another data storage system, such as another service provided by a provider network and may be stored as a snapshot copy. In some embodiments, once a snapshot copy is exported, space on mass storage devices storing data related to the point-in-time snapshot may be released such that the space is available to store newly flushed data. In some embodiments, a customer may request to retrieve a snapshot copy of a volume from a data storage system, and the data storage system may generate the snapshot copy of the volume for a given point-in-time based on multiple blocks, segments, and/or extents read from mass storage devices of the data storage system. In some embodiments, a data storage system may then provide a snapshot copy to a client and retain data related to the point-in-time snapshot stored in the mass storage devices of the data storage system.

In some embodiments, a customer of a block-based storage service may request a snapshot for a volume in a number of ways. For example, in some embodiments a customer may specify that for a certain portion of a volume, for example for a certain offset range, snapshot copies be generated for each write (e.g. a new snapshot may be created for each write). In some embodiments, a customer may request that for the certain portion of the volume snapshot copies be generated for each write during a specified time range. For example, a customer may specify that for a particular offset range a new snapshot is to be created for each write during a time period, such as a number of hours, days, weeks, etc. Also, a customer may request a point-in-time snapshot be created at a certain frequency for a portion of a volume and may specify that for other portions of the volume a point-in-time snapshot is to be created more or less frequently or not at all. In some embodiments, a customer may request a point-in-time snapshot be created for a whole volume or a portion of a volume at a current time or at a time in the future.

FIG. 12C illustrates an example sequence of operations performed by a head node that supports flush-views, according to some embodiments. Chunk 1252 (Chunk 0 of a volume) may represent a portion of a volume serviced by a data storage system. Write 1254, which is a first write and a first operation performed on chunk 1252 since chunk 1252 was last flushed may be received by a head node of a data storage system designated as a primary head node for a volume that includes chunk 1252. In addition write 1256, which is a second write and a second operation performed on chunk 1252 may be received by the primary head node. Data associated with write 1254 and write 1256 may be stored in a log of the head node and an index may be updated to show that the most recent volume data for offset 0-10K is the data written for write 1254 and the most recent volume data for offset 190-200K is the data written for write 1256.

Subsequently, a request for a point-in-time snapshot or flush view may be received, for example view 1 1258 (which is a third operation received). Subsequently, write 1260 may be received and an index for the current version of the volume may be updated to indicate that the most current volume data for offset 0-10K is data written to a log of the head node for write 1260. However, a point in time snapshot reference for view 1 in the index of the head node may continue to indicate that the most recent data for the point-in-time snapshot version of the volume for view 1 for offset 0-10K is the data written to the log for write 1254. Also, subsequent to view 1 1258, write 1262 may be received. In a similar manner an index reference for the current version of the volume may be updated to show that the most recent data for offset 120K-130K is data written to the log of the head node in relation to write 1262. However, the reference for view 1 1258 may not be updated to reference data written to the log of the head node for write 1262.

Subsequently, another request for another point-in-time snapshot or flush view may be received, for example view 2 1264 (which is a sixth operation received). In response, another point-in-time reference may be added to an index of the head node for view 2 1264. Subsequently, write 1266 and write 1268 may be received by the head node for the volume. The current version reference in the index of the head node may be updated to reference data stored in the log of the head node for writes 1266 and 1268 as the most recent versions of the volume for offsets 130K-190K and 190K-200K respectively. However, the index entries for view 1 1258 and view 2 1264 may not be updated to include data written for write 1266 and write 1268.

When a data flush operation is performed for the volume, writes 1254, 1256, 1260, 1262, 1266, and 1268, may all be written to mass storage devices of the data storage system and the current version entry, the view 1 point-in-time snapshot entry and the view 2 point-in-time snapshot entry of the index of the head node may be updated to indicate now locations in the mass storage devices at which data corresponding to writes 1254, 1256, 1260, 1262, 1266, and 1268 are stored.

Furthermore, a data storage system may return views of the volume (e.g. snapshot copies) at different points in time, such as view 1 1258, view 2 1264, and a current view based on the data stored in the mass storage devices and the index entries in the index of the head node for view 1 1258, view 2 1264, and a current view. For example, an index entry for view 1 1258 may reference data stored for write 1254 as the data referenced for offset range 1-10K for the volume. Thus, even though write 1260 is stored in the mass storage devices of a data storage system, the data storage system when constructing a point-in-time snapshot copy of a volume for view 1 1258, may return data stored for write 1254. In a similar manner when constructing a point-in-time snapshot copy for view 2 164, a data storage system may return data for write 1256 as data for offset range 190-200K despite storing data for write 1268 that covers offset range 190-200K. This is because an index entry for view 2 1264 may reference data stored for write 1256 as the data for offset range 190-200K.

Multi-Tier Control Plane

In some embodiments, a data storage system may include multiple data storage units. Management of the data storage system may be performed by a multi-tiered control plane. For example, in some embodiments a zonal control plane may determine which data storage units new volumes are to be allocated to and may perform migration of volumes between data storage units to balance loads. Also, in some embodiments, a local control plane of a data storage unit may determine which head nodes of the data storage unit are to be assigned to a particular volume or volume partition as a primary head node and a secondary head node. Also, a local control plane may manage allocation of extents within a data storage unit via a “sandbox” technique and may perform fail over operations in response to a failure of a head node, a mass storage device, or a data storage sled. In some embodiments, a data storage unit may operate autonomously from a zonal control plane subsequent to a volume being assigned to the data storage unit. Because data storage units may operate autonomous from a zonal control plane, a failure of a zonal control plane may not impact a data storage unit's ability to respond to read and write requests or perform fail-over operations in response to a failure of a head node or a mass storage device. Also, because a local control plane of a data storage unit only affects a single data storage unit, a failure of a local control plane may have a blast radius that is limited to a single data storage unit. Furthermore, a data storage unit may implement a local control plane on one or more head nodes of a data storage unit and implement a lease protocol to allow for fail over of the local control plane from one head node to another head node in response to a failure of a head node implementing the local control plane. In some embodiments, a local control plane may utilize a distributed value store that is distributed across the plurality of head nodes of the data storage unit. Thus, when a particular head node implementing a local control plane fails, another head node taking over implementation of the local control plane may utilize the distributed value store without values in the value store being lost due to the failure of the head node previously implementing the local control plane.

FIG. 13A is a block diagram illustrating a process for creating a volume involving a zonal control plane, a local control plane, and head nodes of a data storage system, according to some embodiments. Data storage system 1300 includes one or more computing devices that implement zonal control plane 1304 and also includes data storage units 1306, 1328, and 1330. Data storage units 1306, 1328, and 1330 may be the same as any of the data storage units described in FIGS. 1-12. Data storage unit 1306 includes head nodes 1308, 1312, and 1314 and data storage sleds 1316. A local control plane 1310 is implemented on head node 1308. Data storage unit 1328 includes head nodes 1318, 1320, and 1324 and data storage sleds 1326. A local control plane 1322 for data storage unit 1328 is implemented on head node 1320. Data storage unit 1330 includes head nodes 1332, 1334, and 1336 and sleds 1340. A local control plane 1338 for data storage unit 1330 is implemented on head node 1336. As can be seen a local control plane for a data storage unit can be implemented on any one or more head nodes of a plurality of head nodes of a data storage unit. In some embodiments, a local control plane may be logically separated from a data plane of a head node, for example a local control plane may be located in a separate container. In some embodiments, each head node of a data storage unit may include logically isolated program instructions for implementing a local control plane and a portion of a distributed value store distributed across logically isolated portions of respective ones of the head nodes. In such embodiments, a given head node holding a lease for implementing the local control plane may implement the local control plane using the program instructions stored in the given head node. Upon failure of the given head node, another given head node may assume the lease for implementing the local control plane and may implement the local control plane using the program instructions for implementing the local control plane stored in the other given head node. For example, the given head node and the other given head node may both store program instructions for implementing the local control plane and a single one of the given head node or the other given head node may implement the local control plane at a given time.

Client device(s) 1302 may be part of a separate network that is separate from data storage system 1300, such as a customer network, or may be client devices within a provider network that utilizes data storage system 1300. Client device(s) 1302 send volume request A 1342 and volume request B 1344 to zonal control plane 1304 to request volumes of data storage system 1300 be allocated to the client devices. In response, zonal control plane 1304 issues a volume creation instruction A 1346 to data storage unit 1306 and a volume creation instruction B 1348 to data storage unit 1328. In some embodiments, volume creation instructions from a zonal control plane may be processed by a local control plane of a data storage unit. For example, local control plane 1310 of data storage unit 1306 processes volume creation instruction A 1346 and local control plane 1322 of data storage unit 1328 processes volume creation instruction B 1348. In some embodiments, a zonal control plane may receive accumulated performance and usage metrics from data storage units and assign volumes, based on the accumulated performance and usage metrics. For example, a zonal control plane may attempt to balance loads between data storage units by selecting to assign new volumes to data storage units that have accumulated performance and usage metrics that indicate less load than other data storage units.

In order to process a volume creation instruction, a local control plane may assign a head node of a data storage unit to function as a primary head node for a volume and may assign another head node of a data storage unit to function as a secondary head node for the volume. For example, local control plane 1310 assigns head node 1312 as a primary head node for the newly created volume via assignment 1350 and assigns head node 1314 as secondary head node for the volume via assignment 1352. Also, local control plane 1322 of data storage unit 1328 assigns head node 1318 as a primary head node for a newly created volume via assignment 1356 and assigns head node 1324 as a secondary head node for the volume via assignment 1358. As can be seen, any one of the head nodes of a data storage unit may be selected to function as a primary or secondary head node for a given volume or volume partition. Also, a local control plane of a data storage unit may collect performance information from head nodes and select primary and secondary head nodes for a given volume based on a current loading of head nodes in a data storage unit. In some embodiments, a local control plane may attempt to balance loads between head nodes when assigning primary and secondary head nodes for a given volume.

FIG. 13B is a block diagram illustrating head nodes of a data storage unit servicing read and write requests independent of a zonal control plane of a data storage system, according to some embodiments. Data storage system 1300 illustrated in FIG. 13B is the same data storage system 1300 as illustrated in FIG. 13A and shows read and write requests being sent to head nodes after primary and secondary head nodes for the newly created volumes have been assigned. As can be seen, read and write requests may be serviced by data storage units of a data storage system independent of a zonal control plane. Also, in some embodiments, read and write requests may be serviced independent of a local control plane. For example read request 1368 and write request 1360 are directed directly to head node 912 that functions as a primary head node for the newly created volume. Also, primary head node sends read data 1372 and write acknowledgement 1364 to client device(s) 1302 without passing the read data 1372 or the write acknowledgment 1364 through zonal control plane 1304 or local control plane 1310. In some embodiments, each head node may be assigned at least one public network address, such as a public IP address. When a head node is assigned to function as a primary head node for a volume of a client, the primary head node's public IP address may be communicated to the client device and the client device's address may be communicated to the head node functioning as primary head node. Thus, subsequent communications between the head node and the client device may be directly routed between the exchanged address information. In some embodiments, read and write requests may be directed to both a primary and secondary head node. For example, if a client does not receive a response from a primary head node, the client may direct a read or write request to a secondary head node. In some embodiments, this may trigger a secondary head node to attempt to assume the role of primary head node.

FIG. 14A is a block diagram of a head node, according to some embodiments. Head node 1400 may be any of the head nodes described in FIG. 1-13 or 15-23. Head node 1400 includes a data control plane 1402, storage 1410, local control plane 1404, and monitoring module 1416. A data control plane of a head node, such as data control plane 1402, may service read and write requests directed to the head node. For example, a data control plane may store one or more public IP addresses of the head node and provide the public IP addresses of the head node to client devices to allow the client devices to communicate with the head node. A storage of a head node, such as storage 1410, may include a log, such as log 1412, and an index, such as index 1414. Log 1412 and index 1414 may be similar to log 408 and index 406 as described in regard to FIGS. 4A and 4B and may store pointers for volume data indicating where the volume data is stored. In some embodiments, a data control plane, such as data control plane 1402, may consult an index, such as index 1414, in order to service read and write requests directed at a particular volume for which the head node is functioning as a primary head node. In some embodiments, an index, such as index 1414 may indicate whether a portion of volume data for a volume is stored in a log of the head node, such as log 1412, or is stored in an extent across multiple data storage sleds, such as mass storage devices 1422 of data storage sled 1418 illustrated in FIG. 14B that also includes sled controller 1420. In addition, a head node may include program instructions for implementing a local control plane that are logically isolated from the data control plane of the head node.

In some embodiments, a local control plane includes an extent allocation service, such as extent allocation service 1406, and a distributed value store, such as value store 1408. An extent allocation service may provide “sandbox” recommendations to head nodes of a data storage unit that include sets of columns from which the head nodes may select new extents. A value store may store extent allocation information and may also store head node assignment information. In some embodiments, a local control plane may provide sequence numbers to newly assigned primary head nodes. In some embodiments, a distributed value store, such as value store 1408, may be implemented over all or a portion of the head nodes of a data storage unit. This may provide fault tolerance such that if any one or more of the head nodes fail, the remaining head nodes may include data from the distributed data store, such that data from the distributed data store is not lost due to the failure of the one or more head nodes.

In some embodiments, a head node may include a data flush mechanism configured to track data written to a storage of a head node but not yet flushed to mass storage devices of a data storage system that includes the head node. For example, head node 1400 includes flusher 1426 that may track data written to storage 1410 but not yet flushed to mass storage devices 1422. In some embodiments, in order to perform a data flush operation, a data flush mechanism, such as flusher 1426, may read data stored in a storage of a head node, such as data stored in log 1412. The flusher may determine which data to read for a volume based on one or more indexes, such as index 1414 and/or a flusher chunk index as described above in FIG. 10, wherein the flusher chunk index indicates portions of a volume for which data is written to a storage of a head node, but not yet flushed to data storage devices of the data storage system.

In some embodiments, a data storage system may further include a garbage collection system, such as garbage collection system 1424. A garbage collection system may determine data stored in mass storage devices that is no longer referenced by an index of a storage of a head node, such as index 1414. In response to determining that data is stored in mass storage devices of a data storage system but no longer referenced by a current version or one or more point-in-time snapshot views, a garbage collection system may release the storage and/or consolidate blocks and/or segments that include multiple out of date blocks to new segments or extents.

In some embodiments, a head node includes a monitoring module, such as monitoring module 1416. Monitoring module may collect performance and/or usage metrics for the head node. A head node, such as head node 1400 may provide performance and/or usage metrics to a local control plane, such as local control plane 1004, or may provide performance and/or usage metrics to a zonal control plane.

FIG. 15 is a high-level flowchart illustrating a process of creating a volume in a data storage system, according to some embodiments.

At 1502, a local control plane of a data storage unit of a data storage system receives a volume assignment from a zonal control plane of the data storage system.

At 1504, the local control plane assigns a first head node of the data storage unit to function as a primary head node for the newly created or newly assigned volume. At 1506, the local control plane assigns a second head node of the data storage unit to function as a secondary head node for the newly created or newly assigned volume. Note that in some embodiments, a zonal control plane may move volume between data storage units of a data storage system. Thus the newly assigned volume may be an existing volume being moved from another data storage unit of the data storage system. Also, a local control plane of a data storage unit may select head nodes to function as primary and secondary head nodes from any of the head nodes of the data storage unit. However, a head node functioning as a primary head node may not function as a secondary head node for the same volume. But, a given head node may function as a primary head node for more than one volume and may also function as a secondary head node for one or more other volumes.

At 1508 the primary head node for the volume services read and write requests directed at the volume. In some embodiments, a head node functioning as a primary head node may service read and write requests independent of a zonal control plane and/or independent of a local control plane of a data storage unit.

FIG. 16A is a high-level flowchart illustrating a local control plane of a data storage unit providing storage recommendations to a head node of the data storage unit for locations to store data in data storage sleds of the data storage unit for a given volume, according to some embodiments.

At 1602, a local control plane of a data storage unit allocates a “sandbox” to a particular volume serviced by a primary head node functioning as primary head node for the particular volume. The sandbox may include a set of columns of mass storage devices from which the head node is recommended to select extents for the particular volume. In some embodiments, the sandbox may include extents that already include corresponding columns in multiple mass storage devices and the head node may be recommended to select extents for the particular volume from the extents included in the sandbox recommendation.

At 1604, the local control plane collects performance metrics from data storage sleds and/or head nodes in the data storage unit.

At 1606, the local control plane issues “sandbox’ updates to the primary head node functioning as a primary head node for the particular volume. The sandbox updates may be based on the collected performance metrics collected at 1604. A local control plane may allocate sandbox recommendations and update sandbox recommendations to avoid heat collisions wherein multiple head nodes are attempting to access the same data storage sleds at the same time. In some embodiments, a sandbox recommendation may be a loose constraint and a head node functioning as a primary head node may select columns or extents that are not included in a sandbox recommendation. It should also be noted that sandbox recommendation and performance and/or usage metrics collection may be performed outside of the I/O path. Thus, if there is a failure or corruption of the local control plane, reads and writes may continue to be processed by non-affected head nodes of a data storage unit. Also, a sandbox allocated to a particular volume may remain with the particular volume during a failover of head nodes. For example, if a primary head node for a particular volume fails, the sandbox allocated for the particular volume may move with the particular volume that will now be serviced by a former secondary head node. Subsequent to a head node failover, sandbox updates, such as the sandbox updates described at 1606, may be issued from the local control plane to the new primary head node for the volume.

FIG. 16B is a high-level flowchart illustrating a head node of a data storage unit storing data in data storage sleds of the data storage unit, according to some embodiments.

At 1652, a primary head node determines a segment of data to be flushed to mass storage devices in data storage sleds of a data storage unit. For example, exceeding one or more thresholds, such as an amount of data stored in a log, an age of data stored in a log, or an infrequency at which the data is accessed in a log, may trigger a primary head node to flush data to data storage sleds.

At 1654, a primary head node may determine if there is available space in a sandbox allocated to a volume serviced by the primary head node. At 1656, in response to determining there is sufficient space in the sandbox, the primary head node flushes the data to extents that include columns in the allocated sandbox allocated for the volume. At 1658, in response to determining there is insufficient space in the sandbox or in response to determining a placement in the sandbox will violate a placement restriction, such as a durability level, the primary head node selects extents outside of the sand box.

FIG. 17 is a high-level flowchart illustrating head nodes of a data storage unit performing a fail over operation in response to a failure of or loss of communication with one of the head nodes of the data storage unit, according to some embodiments.

At 1702 communication with a primary head node is lost or the primary head node fails. In some embodiments, a client device may lose contact with a primary head node and the client device may contact the secondary head node. This may trigger the secondary head node to attempt to take over as primary head node.

At 1704, in response to the secondary head node attempting to take over as primary head node, the local control plane issues a new sequence number to the secondary head node. The new sequence number may be greater than a sequence number previously issued to the previous primary head node. The new sequence number may be used by the secondary head node to gain write access to extents that were previously reserved for write access only by the previous primary head node.

At 1706, the secondary head node assumes the role of primary head node and begins to service writes directed to the volume. In some embodiments, the secondary head node may assume the role of primary head node by presenting the new sequence number received from the local control plane to sled controllers of the data storage system and receiving, from the sled controllers, credentials for writing to columns that store data of the volume.

At 1708, the local control plane designates another head node of the data storage unit to function as a secondary head node for the volume or volume partition. Note that the previous secondary head node has assumed the role of primary head node, such that the volume is without a secondary head node causing the local control plane to designate a new secondary head node.

At 1710, the new primary head node (previous secondary head node) replicates log and index data for the volume to the newly designated secondary head node. In some embodiments, replicating log and index data may include replicating index data for the volume including pointers for volume data stored in data storage sleds of a data storage unit and volume data stored in the log of the new primary head node (previous secondary head node) that has not yet been flushed to the data storage sleds.

FIG. 18 is a block diagram illustrating performance and/or usage metrics being collected and accumulated in a data storage unit, according to some embodiments.

Data storage system 1800 may be the same as data storage system 1300 illustrated in FIG. 13. Data storage system includes zonal control plane 1804 and data storage units 1806, 1828, and 1830. In some embodiments, data storage sleds and head nodes of a data storage unit may report performance and usage metrics to a local control plane for the data storage unit. For example, head nodes 1808, 1812, and 1814 of data storage unit 1806 report performance and usage metrics to local control plane 1810 of data storage unit 1806. Also, a sled controller of each of data storage sleds 1816 may report performance and usage metrics to local control plane 1810. In a similar manner, data storage sleds 1826 and head nodes 1818, 1820, and 1824 of data storage unit 1828 may report performance and usage metrics to local control plane 1822 of data storage unit 1828. Likewise, data storage sleds 1840 and head nodes 1832, 1834, and 1836 of data storage unit 1830 may report performance and usage metrics to local control plane 1838. In some embodiments, each local control plane of a data storage unit may in turn report accumulated performance and usage metrics to a zonal control plane for the data storage system. For example, local control planes 1810, 1822, and 1838 report performance and usage metrics to zonal control plane 1804. In some embodiments local control planes may use performance and usage metrics to balance loads between head nodes and to update sandbox recommendations that indicate recommended data storage sleds from which head nodes should select extents for a given volume. Also, a zonal control plane may use cumulative performance and usage metrics to balance volume assignments and/or move volumes between data storage units. In some embodiments, performance and usage metrics may be used by a local control plane to balance loads within a given data storage unit and accumulated performance and usage metrics may be used by a zonal control plane to balance loads between data storage units.

Input/Output Fencing of Mass Storage Devices from Unauthorized Head Nodes

In some embodiments, a sled controller of a data storage sled may implement a fencing protocol that prevents unauthorized head nodes from writing data to columns of mass storage devices located in a data storage sled along with the sled controller. In some embodiments, a sled controller may issue credentials or tokens to head nodes for accessing columns allocated to a particular volume serviced by the respective head nodes. The sled controller may only issue a new token to a head node if a column associated with the credential or token is not currently reserved or if a head node seeking to access the column presents a sequence number greater than a sequence number stored for the column that indicates a sequence number of a previous head node that requested to access the column. For example, a newly designated primary head node for a given volume may receive from a local or zonal control plane a sequence number for the given volume that is greater than a previously issued sequence number for the given volume. The newly designated primary head node may then present the new sequence number to sled controllers of data storage sleds that include columns allocated for the volume. The sequence number of the newly designated primary head node may be greater than a sequence number stored in the columns that corresponded to a sequence number of a previous primary head node that accessed the columns. Upon determining that the newly designated primary head node has presented a sequence number greater than a stored sequence number, the sled controllers may issue a new token to the newly designated primary head node for accessing the columns.

For example, FIG. 19 illustrates interactions between a local control plane, head nodes, and data storage sleds of a data storage unit in relation to writing data to mass storage devices of a data storage sled of the data storage unit, according to some embodiments. Various interactions are illustrated between local control plane 1902 of data storage unit, head nodes 1904 and 1906 of the data storage unit and sled controllers 1908 of the data storage unit. Any of the data storage units described herein may include a local control plane, head nodes and sled controllers of data storage sleds that function as described in FIG. 19.

Phases 1, 2, and 3 are illustrated to show interactions that take place at different phases of operation of a data storage system. For example, phase 1 may be a normal phase in which a head node is assuming the role of primary head node for a volume or volume partition and functioning as the primary head node for the volume or volume partition. Phase 2 may represent a failover phase in which a secondary head node is assuming the role of primary head node for the volume, and phase 3 may represent a new normal phase wherein a newly designated primary head node is functioning as a primary head node for the volume.

At phase 1, local control plane 1902 assigns (1910) head node 1904 to be a primary head node for a volume and assigns (1912) head node 1906 to be a secondary head node for the volume. Assignment 1910 may include a new sequence number that is a monotonically increasing number that is greater than all sequence numbers previously issued by the local control plane 1902. At phase 1, in order to reserve columns of mass storage devices in different ones of multiple data storage sleds of a data storage unit, head node 1904 presents (1914) the new sequence number to sled controllers 1908 and reserves (1914) columns on mass storage devices located in data storage sleds that include the sled controllers 1908. At 1916, the sled controllers issue credentials or tokens to head node 1904 indicating that the columns are reserved for the volume and that head node 1904 is functioning as primary head node for the volume. At 1918, head node 1904 then issues a write request to sled controllers 1908 and includes along with the write requests the tokens or credentials issued by the sled controllers. The sled controllers verify that the credentials or tokens included with the write request are valid, perform the requested write, and at 1920 issue a write acknowledgement to head node 1904. Also the sled controllers store the sequence number and volume ID or volume partition ID in each column along with the data included with the write request.

During phase 2 or the fail over phase, communication is lost with head node 1904 at 1922. In some embodiments, loss of communication with a primary head node may be triggered by a client device failing to be able to reach the primary head node and instead contacting the secondary head node. In such embodiments, the secondary head node may attempt to take over as primary head node (not illustrated in FIG. 19). In some embodiments, a local control plane may determine that a primary head node has been lost. In response to determining that a primary head node has failed or there is a loss of communication with a primary head node, at 1924, local control plane 1902 promotes head node 1906 to primary head node for the volume and issues a new sequence number to head node 1906. Head node 1906 then, at 1926, presents the new sequence number issued to head node 1906 to sled controllers 1908 and requests access to the columns that store data for the volume for which head node 1906 is now the primary head node. The new sequence number issued to head node 1906 is greater than the sequence number issued to head node 1904 at 1910. At 1928, the sled controllers issue a new token or credential to head node 1906 that supersedes the token or credential issued to head node 1904 at 1916.

During phase 3, head node 1906 functions as a primary head node for the volume. At 1930 head node 1906 includes with subsequent write requests the tokens issued from the sled controllers at 1928. At 1932 sled controllers acknowledge subsequent writes from head node 1906. Also, at 1934 head node 1904 that has lost communication with control plane 1902 and/or head node 1906 attempts to perform a write to columns assigned to the volume. However, subsequent to the failover, head node 1904 is no longer the primary head node for the volume and head node 1906 is functioning as primary head node for the volume. Thus, head node 1906 has exclusive access to columns of mass storage devices of extents allocated to the volume. Thus, at 1934 when head node 1904 attempts to access the columns sled controllers 1908 decline (1936) to perform the write. In addition, at 1936 the head node 1904 may read the volume ID and new sequence number stored in the columns assigned to the volume. The columns may store the new sequence number issued to head node 1906 during the failover. Upon determining that a new sequence number has been stored that supersedes the sequence number last issued to head node 1904, head node 1904 may determine that it is no longer primary head node for the volume and may assume a role of secondary head node for the volume.

Note that each column stores a volume or volume partition ID for a volume for which the column is allocated along with a most recent sequence number. The volume ID and sequence number may be saved in persistent memory of the column. Also, a sled controller may store volume ID and sequence number information in a volatile memory of the sled controller. However, when a sled controller is reset, e.g. loses power, the volume and sequence number stored in the sled controller may be lost. However, volume and sequence number information stored in columns of mass storage devices may be persisted. This avoids complications that may arise if mass storage devices are moved between data storage sleds. For example, if a mass storage device is moved within a data storage sled or amongst data storage sleds, sled controller volume ID and sequence number information may become inaccurate. However, because volume ID and sequence number information is lost from a sled controller whenever power is lost to the sled controller, the sled controller may be reset when a sled is removed from a data storage unit to access mass storage devices in the data storage sled avoiding such complications. Thus, subsequent to a reboot of a sled controller, head nodes serving as primary head nodes for volumes that have columns allocated on a sled that includes the sled controller may need to reclaim the columns. For example the head nodes may present respective sequence numbers issued to the head nodes and the sled controllers may issue new credentials or tokens to the head nodes if the sequence numbers presented have not be superseded, e.g. the sequence numbers stored in the columns are not greater than the sequence numbers being presented by the head nodes.

FIG. 20 is a high-level flowchart of a head node of a data storage unit flushing data stored in a storage of the head node to a data storage sled of the data storage unit, according to some embodiments.

At 2002, a head node functioning as a primary head node for a volume receives a write request. At 2004, the head node writes data included with the write request to a storage of the head node, such as a log of the head node.

At 2006, in response to determining data stored in the storage of the head node exceeds a threshold, the head node requests sled controllers of multiple data storage sleds cause portions of the data stored in the storage of the head node be stored in multiple portions of different mass storage devices in different ones of the data storage sleds of the data storage unit. Requesting the sled controllers to store the data may further include presenting credentials (2008), such as credentials described in FIG. 19, to each of the sled controllers.

FIG. 21 is a high-level flowchart of a sled controller of a data storage sled processing a write request, according to some embodiments.

At 2102, a sled controller receives a credential from a head node along with a write request. At 2104 and 2106, the sled controller determines if the credential received at 2102 is a currently valid credential for a column of a mass storage device in a data storage sled that includes the sled controller. A sled controller may compare a sequence number and/or volume ID included in the credential with a sequence number and/or volume ID saved in the column for which access is requested. If the sequence number and/or volume ID included in the credential match the sequence number and/or volume ID stored in the column the sled controller may determine that the credential is valid. In some embodiments, a sled controller may store information that corresponds with a token or credential, such as a token number. If the information that corresponds with the token stored by the sled controller matches information included in the token, the sled controller may determine the credential or token is a valid credential. If a sequence number included in the credential or token is inferior to a sequence number stored in the column, the sled controller may determine that the credential or token is invalid. In some embodiments, a head node may not currently have credentials for a particular column and may present a sequence number that is greater than a stored sequence number stored for the column and the sled controller may issue credentials that supersede all previously issued credentials for the column, such as a new token that supersedes all tokens previously issued for the column.

At 2112, in response to determining at 2106 that the credential included with the write request is an invalid credential, the sled controller does not perform the requested write and returns a message to the head node indicating that the credential is invalid.

At 2108, in response to determining the credential is valid, the sled controller performs the requested write to the requested column of a mass storage device in the data storage sled along with the sled controller. At 2110 the sled controller acknowledges the write has been performed to the head node.

Data Storage Unit Design with Redundant Networks and Redundant Power

In some embodiments, a data storage unit may include redundant network and redundant power supplies and power distribution systems. Such redundant systems may reduce probabilities of failure thus allowing, for example, a single rack to store all parts of a volume while still meeting customer requirements for reliability and data durability. However, in some embodiments, a volume or volume partition may be stored in more than one data storage unit.

FIGS. 22A-D illustrate a data storage unit with redundant network paths within the data storage unit, according to some embodiments. Data storage unit 2250 illustrated in FIGS. 22A-D may be the same as data storage unit 100 illustrated in FIG. 1, or any other data storage unit described herein. FIGS. 22A-D further illustrate communication paths between network switches 2202 and 2204, head nodes 2206-2208, and data storage sleds 2234-2244. As can be seen, at least two redundant networks, including internal network 2252 and internal network 2254, are implemented within data storage unit 2250. Note that paths between components of data storage unit 2250 are illustrated on either side of data storage unit 2250 for clarity, but in practice paths between components of a data storage unit may be within the data storage unit over wires, cables, busways, etc. of the data storage unit.

In FIG. 22A redundant communication paths are established between head node 2206 and network 2228 via network switches 2202 and 2204. In some embodiments, a head node, such as head node 2206, may be assigned redundant network addresses routable from devices external to data storage unit 2250, such as public IP addresses, and may be reachable via either one of the network address using either one of network switches 2202 and 2204.

FIG. 22B illustrates redundant network paths between head nodes. For example head node 2206 may reach head node 2208 via internal network 2252 or internal network 2254, wherein internal network 2252 is via network switch 2202 and internal network 2254 is via network switch 2204. Note that there is a single network hop between head node 2206 and head node 2208 via network switch 2202 or network switch 2204. In some embodiments, a data storage unit may have a single network hop between head nodes and data storage sleds so that input/output operations do not require multiple network hops to retrieve or write data, thus improving IOPS performance and latency.

FIG. 22C illustrates redundant network paths between head nodes and data storage sleds. For example, head node 2206 may reach any of data storage sleds 2234-2244 via sled controllers 2212-2222. Each sled controller may include two network ports that each are connected to different ones of internal networks 2252 or 2254 via either one or network switches 2202 or 2204. In some embodiments, each head node may be assigned at least two private network addresses and each sled controller may be assigned at least two private network addresses. The private network addresses assigned to the head nodes and sled controllers of the data storage sleds may enable the head nodes and sled controllers to communicate with each other via either one of internal networks 2252 or 2254. FIG. 22D illustrates a head node sending a response communication to a client device via either one of internal networks 2252 or 2254.

In some embodiments, a data storage unit may be configured to accept more or less head nodes in a rack of the data storage unit or to accept more or less data storage sleds in the rack of the data storage unit. Thus, compute capacity and data storage capacity of a data storage unit may be adjusted by varying a quantity of head nodes and/or data storage sleds that are included in the data storage unit.

FIGS. 23A-C illustrate a data storage unit configured to allow scaling of storage capacity and processing capacity, according to some embodiments. For example, data storage unit 2302 is shown in arrangement 2300 in FIG. 23A and in arrangement 2320 in FIG. 23B. In arrangement 2320 data storage unit 2302 includes more data storage sleds than in arrangement 2300. Also, in arrangement 2340, data storage unit 2302 includes more head nodes than in arrangement 2300. In some embodiments, a ratio of head nodes to data storage sleds may be adjusted to meet customer needs.

Example Computer System

FIG. 24 is a block diagram illustrating an example computer system, according to various embodiments. For example, computer system 2400 may be configured to implement storage and/or head nodes of a data storage unit, storage and/or a sled controller of a data storage sled, other data stores, and/or a client, in different embodiments. Computer system 2400 may be any of various types of devices, including, but not limited to, a personal computer system, desktop computer, laptop or notebook computer, mainframe computer system, handheld computer, workstation, network computer, a consumer device, application server, storage device, telephone, mobile telephone, or in general any type of computing device.

Computer system 2400 includes one or more processors 2410 (any of which may include multiple cores, which may be single or multi-threaded) coupled to a system memory 2420 via an input/output (I/O) interface 2430. Computer system 2400 further includes a network interface 2440 coupled to I/O interface 2430. In various embodiments, computer system 2400 may be a uniprocessor system including one processor 2410, or a multiprocessor system including several processors 2410 (e.g., two, four, eight, or another suitable number). Processors 2410 may be any suitable processors capable of executing instructions. For example, in various embodiments, processors 2410 may be general-purpose or embedded processors implementing any of a variety of instruction set architectures (ISAs), such as the x86, PowerPC, SPARC, or MIPS ISAs, or any other suitable ISA. In multiprocessor systems, each of processors 2410 may commonly, but not necessarily, implement the same ISA. The computer system 2400 also includes one or more network communication devices (e.g., network interface 2440) for communicating with other systems and/or components over a communications network (e.g. Internet, LAN, etc.).

In the illustrated embodiment, computer system 2400 also includes one or more persistent storage devices 2460 and/or one or more I/O devices 2480. In various embodiments, persistent storage devices 2460 may correspond to disk drives, tape drives, solid state memory, other mass storage devices, block-based storage devices, or any other persistent storage device. Computer system 2400 (or a distributed application or operating system operating thereon) may store instructions and/or data in persistent storage devices 2460, as desired, and may retrieve the stored instruction and/or data as needed. For example, in some embodiments, computer system 2400 may host a storage unit head node, and persistent storage 2460 may include the SSDs that include extents allocated to that head node.

Computer system 2400 includes one or more system memories 2420 that are configured to store instructions and data accessible by processor(s) 2410. In various embodiments, system memories 2420 may be implemented using any suitable memory technology, (e.g., one or more of cache, static random access memory (SRAM), DRAM, RDRAM, EDO RAM, DDR 10 RAM, synchronous dynamic RAM (SDRAM), Rambus RAM, EEPROM, non-volatile/Flash-type memory, or any other type of memory). System memory 2420 may contain program instructions 2425 that are executable by processor(s) 2410 to implement the methods and techniques described herein. In various embodiments, program instructions 2425 may be encoded in platform native binary, any interpreted language such as Java™ byte-code, or in any other language such as C/C++, Java™, etc., or in any combination thereof. For example, in the illustrated embodiment, program instructions 2425 include program instructions executable to implement the functionality of a storage node, in different embodiments. In some embodiments, program instructions 2425 may implement multiple separate clients, nodes, and/or other components.

In some embodiments, program instructions 2425 may include instructions executable to implement an operating system (not shown), which may be any of various operating systems, such as UNIX, LINUX, Solaris™, MacOS™, Windows™, etc. Any or all of program instructions 2425 may be provided as a computer program product, or software, that may include a non-transitory computer-readable storage medium having stored thereon instructions, which may be used to program a computer system (or other electronic devices) to perform a process according to various embodiments. A non-transitory computer-readable storage medium may include any mechanism for storing information in a form (e.g., software, processing application) readable by a machine (e.g., a computer). Generally speaking, a non-transitory computer-accessible medium may include computer-readable storage media or memory media such as magnetic or optical media, e.g., disk or DVD/CD-ROM coupled to computer system 2400 via I/O interface 2430. A non-transitory computer-readable storage medium may also include any volatile or non-volatile media such as RAM (e.g. SDRAM, DDR SDRAM, RDRAM, SRAM, etc.), ROM, etc., that may be included in some embodiments of computer system 2400 as system memory 2420 or another type of memory. In other embodiments, program instructions may be communicated using optical, acoustical or other form of propagated signal (e.g., carrier waves, infrared signals, digital signals, etc.) conveyed via a communication medium such as a network and/or a wireless link, such as may be implemented via network interface 2440.

In some embodiments, system memory 2420 may include data store 2445, which may be configured as described herein. In general, system memory 2420 (e.g., data store 2445 within system memory 2420), persistent storage 2460, and/or remote storage 2470 may store data blocks, replicas of data blocks, metadata associated with data blocks and/or their state, configuration information, and/or any other information usable in implementing the methods and techniques described herein.

In one embodiment, I/O interface 2430 may be configured to coordinate I/O traffic between processor 2410, system memory 2420 and any peripheral devices in the system, including through network interface 2440 or other peripheral interfaces. In some embodiments, I/O interface 2430 may perform any necessary protocol, timing or other data transformations to convert data signals from one component (e.g., system memory 2420) into a format suitable for use by another component (e.g., processor 2410). In some embodiments, I/O interface 2430 may include support for devices attached through various types of peripheral buses, such as a variant of the Peripheral Component Interconnect (PCI) bus standard or the Universal Serial Bus (USB) standard, for example. In some embodiments, the function of I/O interface 2430 may be split into two or more separate components, such as a north bridge and a south bridge, for example. Also, in some embodiments, some or all of the functionality of I/O interface 2430, such as an interface to system memory 2420, may be incorporated directly into processor 2410.

Network interface 2440 may be configured to allow data to be exchanged between computer system 2400 and other devices attached to a network, such as other computer systems 2490, for example. In addition, network interface 2440 may be configured to allow communication between computer system 2400 and various I/O devices 2450 and/or remote storage 2470. Input/output devices 2450 may, in some embodiments, include one or more display terminals, keyboards, keypads, touchpads, scanning devices, voice or optical recognition devices, or any other devices suitable for entering or retrieving data by one or more computer systems 2400. Multiple input/output devices 2450 may be present in computer system 2400 or may be distributed on various nodes of a distributed system that includes computer system 2400. In some embodiments, similar input/output devices may be separate from computer system 2400 and may interact with one or more nodes of a distributed system that includes computer system 2400 through a wired or wireless connection, such as over network interface 2440. Network interface 2440 may commonly support one or more wireless networking protocols (e.g., Wi-Fi/IEEE 802.11, or another wireless networking standard). However, in various embodiments, network interface 2440 may support communication via any suitable wired or wireless general data networks, such as other types of Ethernet networks, for example. Additionally, network interface 2440 may support communication via telecommunications/telephony networks such as analog voice networks or digital fiber communications networks, via storage area networks such as Ethernet, Fibre Channel SANs, or via any other suitable type of network and/or protocol. In various embodiments, computer system 2400 may include more, fewer, or different components than those illustrated in FIG. 24 (e.g., displays, video cards, audio cards, peripheral devices, other network interfaces such as an ATM interface, an Ethernet interface, a Frame Relay interface, etc.)

It is noted that any of the distributed system embodiments described herein, or any of their components, may be implemented as one or more network-based services. For example, a compute cluster within a computing service may present computing and/or storage services and/or other types of services that employ the distributed computing systems described herein to clients as network-based services. In some embodiments, a network-based service may be implemented by a software and/or hardware system designed to support interoperable machine-to-machine interaction over a network. A network-based service may have an interface described in a machine-processable format, such as the Web Services Description Language (WSDL). Other systems may interact with the network-based service in a manner prescribed by the description of the network-based service's interface. For example, the network-based service may define various operations that other systems may invoke, and may define a particular application programming interface (API) to which other systems may be expected to conform when requesting the various operations. though

In various embodiments, a network-based service may be requested or invoked through the use of a message that includes parameters and/or data associated with the network-based services request. Such a message may be formatted according to a particular markup language such as Extensible Markup Language (XML), and/or may be encapsulated using a protocol such as Simple Object Access Protocol (SOAP). To perform a network-based services request, a network-based services client may assemble a message including the request and convey the message to an addressable endpoint (e.g., a Uniform Resource Locator (URL)) corresponding to the network-based service, using an Internet-based application layer transfer protocol such as Hypertext Transfer Protocol (HTTP).

In some embodiments, network-based services may be implemented using Representational State Transfer (“RESTful”) techniques rather than message-based techniques. For example, a network-based service implemented according to a RESTful technique may be invoked through parameters included within an HTTP method such as PUT, GET, or DELETE, rather than encapsulated within a SOAP message.

Although the embodiments above have been described in considerable detail, numerous variations and modifications may be made as would become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to embrace all such modifications and changes and, accordingly, the above description to be regarded in an illustrative rather than a restrictive sense. 

What is claimed is:
 1. A data storage system comprising: a head node; and a plurality of mass storage devices, wherein the head node is configured to store data to a log-based storage of the head node and indicate in an index of the head node a location at which the data is stored; wherein, the head node is further configured to perform a data flush operation, wherein to perform the data flush operation the head node is configured to: read the data stored in the log-based storage of the head node; cause the data to be written to a set of the mass storage devices; and update the index of the head node to indicate one or more locations at which the data is stored on the set of mass storage devices; wherein the data is written to a segment of free storage space in the set of the mass storage devices allocated for the given data flush operation.
 2. The data storage system of claim 1, wherein said cause the data to be written to the set of mass storage devices comprises: the data being erasure encoded into a plurality of striped data portions and a plurality of parity data portions; and the striped portions and the parity portions being stored on different respective mass storage devices of the set of mass storage devices.
 3. The data storage system of claim 1, wherein the head node stores data for a plurality of volumes, wherein for a given volume of the plurality of volumes, the head node is configured to: track, for a plurality of portions of the given volume, given ones of the portions for which data has been written to the log-based storage but not yet flushed to the mass storage devices, and perform the data flush operation based, at least in part, on one or more metrics for the given ones of the portions for which data has been written to the log-based storage but not yet flushed to the mass storage devices exceeding a threshold amount.
 4. The data storage system of claim 3, wherein the segment of free storage space in the set of mass storage devices comprises, for respective ones of the given ones of the portions, respective blocks of free storage space in the set of mass storage devices; wherein, for at least one of the given portions, an amount of free storage space of a corresponding allocated block of free storage space is less than a logical amount of volume space represented by the at least one given portion.
 5. The data storage system of claim 1, wherein, for a given portion of a given volume, the data stored in the log-based storage includes: data representing a current state of the given portion of the given volume; and data representing one or more previous states of the given portion of the given volume; wherein, to perform the flush operation the head node is configured to: read the data representing the current state of the given portion of the given volume and read the data representing at least one of the previous states of the given portion of the given volume; cause the data representing the current state and the data representing the at least one previous state to be written to a segment of free storage space in a set of the mass storage devices; and update the index of the head node to indicate a location at which the data representing the current state of the given portion of the given volume is stored on the mass storage devices and update the index of the head to indicate another location at which the data representing the at least one previous state of the given portion of the given volume is stored on the mass storage devices.
 6. A method comprising: performing a data flush operation, wherein the data flush operation comprises: reading data stored in a storage of a head node of a data storage system, wherein the head node stores a reference indicating a location at which the data is stored in the storage of the head node; writing the data to a set of mass storage devices of the data storage system; and updating the reference to indicate one or more locations at which the data is stored on the set of mass storage devices, wherein the data is written to free space on the set of the mass storage devices allocated for the data flush operation.
 7. The method of claim 6, further comprising prior to said performing the data flush operation: receiving a write request comprising write data for a volume serviced by the data storage system; storing the write data to a log of the storage of the head node; and adding or updating the reference to indicate a location in the log at which the write data is stored in the log.
 8. The method of claim 7, further comprising: receiving a request to create one or more snapshots for at least a portion of the volume; receiving an additional write request comprising additional write data for the volume; storing the additional write data in the log of the storage of the head node; adding or updating a current version reference for the volume, wherein the current version reference indicates a location in the log at which the additional write data is stored in the log; and adding or updating a snapshot reference for the volume, wherein the snapshot reference indicates a location in the log at which the write data that corresponds to the snapshot is stored in the log.
 9. The method of claim 8, further comprising: performing an additional data flush operation, wherein the additional data flush operation comprises: reading the write data and the additional write data from the log of the storage of the head node; writing the write data and the additional write data to the set of mass storage devices of the data storage system or another set of mass storage devices of the data storage system; and updating the current version reference to indicate a location at which the additional write data for the volume is stored on the mass storage devices; and updating the snapshot reference to indicate another location at which the write data is stored on the mass storage devices.
 10. The method of claim 9, further comprising: generating a snapshot copy of the volume for a given point in time, wherein the snapshot copy comprises the write data and one or more other pieces of data stored for the volume prior to the point in time of the snapshot.
 11. The method of claim 7, further comprising: receiving one or more additional write requests, and performing said storing and said updating the reference for the one or more additional write requests; tracking, for a plurality of portions of the volume, given ones of the portions for which data has been written to the storage of the head node but not yet flushed to the mass storage devices, wherein performing the data flush operation is performed based, at least in part, on one or more metrics for the portions of the volume exceeding one or more thresholds.
 12. The method of claim 11, wherein said tracking comprises: updating a bitmap, wherein respective bits of the bitmap represent respective ones of the portions of the volume, wherein for each portion of the volume for which data has been written to the storage of the head node but not yet flushed to the mass storage devices, a corresponding bit in the bitmap for that portion is changed to indicate that there is data stored for that portion that has not been flushed, wherein the bitmap is stored in more than one head node of the data storage system.
 13. The method of claim 11, wherein the one or more metrics for the portions of the volume exceeding one or more thresholds comprise: a quantity of data stored in the storage of the head node but not yet flushed to the mass storage devices exceeding a threshold amount of data; a rate at which write requests for the volume or a portion of the volume are being received exceeding a threshold write rate; or a rate at which data is being stored for the volume or a portion of the volume exceeding a threshold data storage rate.
 14. The method of claim 13, further comprising: additionally performing a time-triggered data flush operation for the volume.
 15. A computer implemented method for implementing a data storage system comprising: reading data stored in a storage of a head node of the data storage system, wherein the head node comprises a reference indicating a location at which the data is stored in the storage of the head node; writing the data to a set of mass storage devices of the data storage system; and updating the reference to indicate one or more locations at which the data is stored on the set of mass storage devices, wherein the data is written to a segment of free space in the set of the mass storage devices.
 16. The computer implemented method of claim 15, further comprising: receiving one or more write requests each comprising write data for a volume serviced by the data storage system; storing the write data in a log of the storage of the head node of the data storage system; and updating or adding a reference to indicate a location in the log at which the write data is stored, wherein the data read from the storage of the head node comprises the write data stored in the log of the storage of the head node.
 17. The computer implemented method of claim 15, further comprising: receiving a request, via an application program interface (API), to create a point-in-time snapshot for at least a portion of the volume; and creating a snapshot index entry in an index of the head node for the point-in-time snapshot.
 18. The computer implemented method of claim 17, wherein said updating the reference of the head node to indicate one or more locations at which the data is stored on the set of mass storage devices comprises: updating a current version entry in the index of the head node to indicate a location at which current write data for the volume is stored on the mass storage devices; and updating the snapshot index entry of the head to indicate another location at which data corresponding to the point-in-time snapshot is stored on the mass storage devices.
 19. The computer implemented method of claim 15, further comprising: tracking, for a plurality of portions of the volume, given ones of the portions for which data has been written to the storage of the head node but not yet flushed to the mass storage devices wherein said reading, said writing, and said updating the reference are performed based, at least in part, on a tracked metric for the plurality of portions of the volume exceeding a threshold amount.
 20. The computer implemented method of claim 19, wherein, for at least one the given portions, an amount of storage space of a corresponding allocated block of free storage space in the mass storage devices is less than a logical amount of volume space of the volume represented by the at least one given portion. 